aboutsummaryrefslogtreecommitdiff
path: root/internal/lfsutil
diff options
context:
space:
mode:
authorZachary Walters <zachary.christopher.walters@gmail.com>2023-02-03 23:43:36 -0600
committerGitHub <noreply@github.com>2023-02-04 13:43:36 +0800
commit5887bc116f00062e3e9c0dcc7cc8eca84f5160ac (patch)
treef3ecbfdb9a084821d1b524ce020f46378d416e71 /internal/lfsutil
parent6d220540c15e68196404951e8b67cac8002d1a6f (diff)
chore: remove usages of the deprecated `ioutil` (#7332)
Co-authored-by: Joe Chen <jc@unknwon.io>
Diffstat (limited to 'internal/lfsutil')
-rw-r--r--internal/lfsutil/storage_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/lfsutil/storage_test.go b/internal/lfsutil/storage_test.go
index 86702758..d0f5b097 100644
--- a/internal/lfsutil/storage_test.go
+++ b/internal/lfsutil/storage_test.go
@@ -6,7 +6,7 @@ package lfsutil
import (
"bytes"
- "io/ioutil"
+ "io"
"os"
"path/filepath"
"runtime"
@@ -79,7 +79,7 @@ func TestLocalStorage_Upload(t *testing.T) {
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
- written, err := s.Upload(test.oid, ioutil.NopCloser(strings.NewReader(test.content)))
+ written, err := s.Upload(test.oid, io.NopCloser(strings.NewReader(test.content)))
assert.Equal(t, test.expWritten, written)
assert.Equal(t, test.expErr, err)
})
@@ -100,7 +100,7 @@ func TestLocalStorage_Download(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- err = ioutil.WriteFile(fpath, []byte("Hello world!"), os.ModePerm)
+ err = os.WriteFile(fpath, []byte("Hello world!"), os.ModePerm)
if err != nil {
t.Fatal(err)
}