INNER CODE UNIT · Go
leafMatchType
lamoda/gonkey · compare/compare.go:204
func leafMatchType(expected interface{}) leafsMatchType {
val, ok := expected.(string)
if !ok {
return pure
}
if matches := regexExprRx.FindStringSubmatch(val); matches != nil {
return regex
}
return pure
}
func makeError(path, msg string, expected, actual interface{}) error {
return fmt.Errorf(
"at path %s %s:\n expected: %s\n actual: %s",
color.CyanString(path),
msg,