Fix deprecation notice for io/ioutil (#477)

## Changes

"io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same
functionality is now provided by package io or package os, and those
implementations should be preferred in new code. See the specific
function documentation for details.

## Tests

n/a
This commit is contained in:
Pieter Noordhuis 2023-06-15 12:38:30 +02:00 committed by GitHub
parent faeddfae68
commit becf4d9c31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ package internal
import (
"context"
"errors"
"io/ioutil"
"io"
"net/http"
"os"
"path/filepath"
@ -69,7 +69,7 @@ func assertLocalFileContents(t *testing.T, path string, content string) {
func assertFilerFileContents(t *testing.T, ctx context.Context, f filer.Filer, path string, content string) {
r, err := f.Read(ctx, path)
require.NoError(t, err)
b, err := ioutil.ReadAll(r)
b, err := io.ReadAll(r)
require.NoError(t, err)
assert.Contains(t, string(b), content)
}