Use buf.String() instead of string(buf.Bytes())

This commit is contained in:
Michael Eischer 2020-03-06 23:36:27 +01:00
parent 460e2ffbf6
commit d19f05c960
1 changed files with 2 additions and 2 deletions

View File

@ -151,7 +151,7 @@ func testRunCheckOutput(gopts GlobalOptions) (string, error) {
}
err := runCheck(opts, gopts, nil)
return string(buf.Bytes()), err
return buf.String(), err
}
func testRunRebuildIndex(t testing.TB, gopts GlobalOptions) {
@ -177,7 +177,7 @@ func testRunLs(t testing.TB, gopts GlobalOptions, snapshotID string) []string {
rtest.OK(t, runLs(opts, gopts, []string{snapshotID}))
return strings.Split(string(buf.Bytes()), "\n")
return strings.Split(buf.String(), "\n")
}
func testRunFind(t testing.TB, wantJSON bool, gopts GlobalOptions, pattern string) []byte {