diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-09-16 15:15:24 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-09-20 17:22:33 +0300 |
commit | 127ca6b9de8d5cca31db5e2345519cf39b0a0e29 (patch) | |
tree | 74d34290ed1e9ca3b356094e68ff5ef7504fa8b9 /internal/cache | |
parent | 4311879356b4a4fcb704373b33afd41148e34fc7 (diff) |
global: Replace deprecated usage of `ioutil.ReadAll()`
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.ReadAll()` with `io.ReadAll()` to adapt accordingly.
Diffstat (limited to 'internal/cache')
-rw-r--r-- | internal/cache/diskcache_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/cache/diskcache_test.go b/internal/cache/diskcache_test.go index af858cbc9..04bc54964 100644 --- a/internal/cache/diskcache_test.go +++ b/internal/cache/diskcache_test.go @@ -3,7 +3,6 @@ package cache import ( "context" "io" - "io/ioutil" "strings" "sync" "testing" @@ -49,7 +48,7 @@ func TestStreamDBNaiveKeyer(t *testing.T) { expectGetHit := func(expectStr string, req *gitalypb.InfoRefsRequest) { actualStream, err := cache.GetStream(ctx, req.Repository, req) require.NoError(t, err) - actualBytes, err := ioutil.ReadAll(actualStream) + actualBytes, err := io.ReadAll(actualStream) require.NoError(t, err) require.Equal(t, expectStr, string(actualBytes)) } |