Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-17 17:09:53 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-20 17:22:33 +0300
commit4311879356b4a4fcb704373b33afd41148e34fc7 (patch)
treee266b31c89bb0f3277a995d8902cbf72c7cac10e /internal/streamcache
parent4d6bbe3774f7c926ad655a26336ff093f1a7a32b (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 'internal/streamcache')
-rw-r--r--internal/streamcache/cache_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/streamcache/cache_test.go b/internal/streamcache/cache_test.go
index a21b726ed..c8aaf17c1 100644
--- a/internal/streamcache/cache_test.go
+++ b/internal/streamcache/cache_test.go
@@ -326,7 +326,7 @@ func TestCache_failedWrite(t *testing.T) {
require.NoError(t, err)
require.True(t, created)
- _, err = io.Copy(ioutil.Discard, r1)
+ _, err = io.Copy(io.Discard, r1)
require.NoError(t, err, "errors on the write end are not propagated via Read()")
require.NoError(t, r1.Close(), "errors on the write end are not propagated via Close()")
require.Error(t, r1.Wait(context.Background()), "error propagation happens via Wait()")