From d19f05c960b09d0c2b65e500a07e56a76b00c756 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 6 Mar 2020 23:36:27 +0100 Subject: [PATCH] Use buf.String() instead of string(buf.Bytes()) --- cmd/restic/integration_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/restic/integration_test.go b/cmd/restic/integration_test.go index f1b1ae7c6..f066e907d 100644 --- a/cmd/restic/integration_test.go +++ b/cmd/restic/integration_test.go @@ -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 {