mirror of https://github.com/databricks/cli.git
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:
parent
faeddfae68
commit
becf4d9c31
|
@ -3,7 +3,7 @@ package internal
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"io/ioutil"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"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) {
|
func assertFilerFileContents(t *testing.T, ctx context.Context, f filer.Filer, path string, content string) {
|
||||||
r, err := f.Read(ctx, path)
|
r, err := f.Read(ctx, path)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
b, err := ioutil.ReadAll(r)
|
b, err := io.ReadAll(r)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Contains(t, string(b), content)
|
assert.Contains(t, string(b), content)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue