diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-09-17 17:09:53 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-09-20 17:22:33 +0300 |
commit | 4311879356b4a4fcb704373b33afd41148e34fc7 (patch) | |
tree | e266b31c89bb0f3277a995d8902cbf72c7cac10e /cmd | |
parent | 4d6bbe3774f7c926ad655a26336ff093f1a7a32b (diff) |
global: Replace deprecated usage of `ioutil.Discard`
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.Discard` with `io.Discard` to adapt accordingly.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gitaly-backup/create_test.go | 4 | ||||
-rw-r--r-- | cmd/gitaly-backup/restore_test.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cmd/gitaly-backup/create_test.go b/cmd/gitaly-backup/create_test.go index 68e8dc2bd..bb58c435f 100644 --- a/cmd/gitaly-backup/create_test.go +++ b/cmd/gitaly-backup/create_test.go @@ -6,7 +6,7 @@ import ( "encoding/json" "flag" "fmt" - "io/ioutil" + "io" "path/filepath" "testing" @@ -59,7 +59,7 @@ func TestCreateSubcommand(t *testing.T) { require.NoError(t, fs.Parse([]string{"-path", path})) require.EqualError(t, - cmd.Run(context.Background(), &stdin, ioutil.Discard), + cmd.Run(context.Background(), &stdin, io.Discard), "create: pipeline: 1 failures encountered") for _, repo := range repos { diff --git a/cmd/gitaly-backup/restore_test.go b/cmd/gitaly-backup/restore_test.go index d5b7be2c3..a5a5e33c4 100644 --- a/cmd/gitaly-backup/restore_test.go +++ b/cmd/gitaly-backup/restore_test.go @@ -6,7 +6,7 @@ import ( "encoding/json" "flag" "fmt" - "io/ioutil" + "io" "path/filepath" "testing" @@ -66,7 +66,7 @@ func TestRestoreSubcommand(t *testing.T) { require.NoError(t, fs.Parse([]string{"-path", path})) require.EqualError(t, - cmd.Run(context.Background(), &stdin, ioutil.Discard), + cmd.Run(context.Background(), &stdin, io.Discard), "restore: pipeline: 1 failures encountered") for _, repo := range repos { |