diff --git a/filestore/filestore_test.go b/filestore/filestore_test.go index 8117a2392..f3f3e64dd 100644 --- a/filestore/filestore_test.go +++ b/filestore/filestore_test.go @@ -3,8 +3,8 @@ package filestore import ( "bytes" "context" - "io/ioutil" "math/rand" + "os" "testing" dag "github.com/ipfs/go-merkledag" @@ -21,7 +21,7 @@ var bg = context.Background() func newTestFilestore(t *testing.T) (string, *Filestore) { mds := ds.NewMapDatastore() - testdir, err := ioutil.TempDir("", "filestore-test") + testdir, err := os.MkdirTemp("", "filestore-test") if err != nil { t.Fatal(err) } @@ -34,7 +34,7 @@ func newTestFilestore(t *testing.T) (string, *Filestore) { } func makeFile(dir string, data []byte) (string, error) { - f, err := ioutil.TempFile(dir, "file") + f, err := os.CreateTemp(dir, "file") if err != nil { return "", err } diff --git a/filestore/pb/dataobj.pb.go b/filestore/pb/dataobj.pb.go index 5ecc2489e..d342cabe5 100644 --- a/filestore/pb/dataobj.pb.go +++ b/filestore/pb/dataobj.pb.go @@ -5,10 +5,11 @@ package datastore_pb import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used.