avoiding unnecessary type conversions

This commit is contained in:
Alexandr Bruyako
2019-06-30 23:58:00 +03:00
parent 8b22fe29cf
commit 76d1866444
2 changed files with 2 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ foo 2018-08-19 22:22:22 xxx other /home/user/other
}
want := strings.TrimLeft(test.output, "\n")
if string(buf.Bytes()) != want {
if buf.String() != want {
t.Errorf("wrong output\n---- want ---\n%s\n---- got ---\n%s\n-------\n", want, buf.Bytes())
}
})