2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-26 23:06:32 +00:00

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

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 {