Fix panic for equality assertions for values of aliased string type

pull/783/head
Vitaly Isaev 2018-09-26 23:40:04 +03:00 committed by George Lesica
parent 0224ef258e
commit 555ebd3959
1 changed files with 2 additions and 2 deletions

View File

@ -1422,8 +1422,8 @@ func diff(expected interface{}, actual interface{}) string {
e = spewConfig.Sdump(expected)
a = spewConfig.Sdump(actual)
} else {
e = expected.(string)
a = actual.(string)
e = reflect.ValueOf(expected).String()
a = reflect.ValueOf(actual).String()
}
diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{