Add a CallerPrettyfier callback to the text formatter

This commit is contained in:
David Bariod
2019-02-27 13:34:02 +01:00
parent 5e9b246bea
commit ffec2f2e0a
3 changed files with 36 additions and 5 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ func LogAndAssertText(t *testing.T, log func(*Logger), assertions func(fields ma
log(logger)
fields := make(map[string]string)
for _, kv := range strings.Split(buffer.String(), " ") {
for _, kv := range strings.Split(strings.TrimRight(buffer.String(), "\n"), " ") {
if !strings.Contains(kv, "=") {
continue
}