INNER CODE UNIT · Go
comparePure
lamoda/gonkey · compare/compare.go:162
func comparePure(path string, expected, actual interface{}) (errors []error) {
if expected != actual {
errors = append(errors, makeError(path, "values do not match", expected, actual))
}
return errors
}
func compareRegex(path string, expected, actual interface{}) (errors []error) {
regexExpr, ok := expected.(string)
if !ok {
errors = append(errors, makeError(path, "type mismatch", "string", reflect.TypeOf(expected)))
return errors
}
value := fmt.Sprintf("%v", actual)