From 8f5df19b353e02ffba842fd1b15ccf93da7ee3b4 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Mon, 7 Jul 2025 19:54:48 +0200 Subject: Fix a bunch of staticcheck errors Tool-assisted. --- tests/root_test/issue893_test.go | 5 ++--- tests/root_test/root_test.go | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'tests/root_test') diff --git a/tests/root_test/issue893_test.go b/tests/root_test/issue893_test.go index 6ad8e6d..2db0b19 100644 --- a/tests/root_test/issue893_test.go +++ b/tests/root_test/issue893_test.go @@ -4,7 +4,6 @@ package root_test import ( "fmt" - "io/ioutil" "os" "sync" "syscall" @@ -35,10 +34,10 @@ func TestConcurrentUserOps(t *testing.T) { if err = os.MkdirAll(d, 0700); err != nil { return } - if err = ioutil.WriteFile(d+"/foo", nil, 0400); err != nil { + if err = os.WriteFile(d+"/foo", nil, 0400); err != nil { return } - if err = ioutil.WriteFile(d+"/bar", []byte("aaaaaaaaaaaaaaaaaaaaa"), 0400); err != nil { + if err = os.WriteFile(d+"/bar", []byte("aaaaaaaaaaaaaaaaaaaaa"), 0400); err != nil { return } if err = syscall.Unlink(d + "/foo"); err != nil { diff --git a/tests/root_test/root_test.go b/tests/root_test/root_test.go index 9ce1f4b..7bc3ebc 100644 --- a/tests/root_test/root_test.go +++ b/tests/root_test/root_test.go @@ -5,7 +5,6 @@ package root_test import ( - "io/ioutil" "os" "os/exec" "path/filepath" @@ -203,7 +202,7 @@ func TestDiskFull(t *testing.T) { } t.Logf("sz1=%d, sz2=%d", sz1, sz2) - foo1, err := ioutil.ReadFile(mnt + "/foo1") + foo1, err := os.ReadFile(mnt + "/foo1") if err != nil { t.Fatal(err) } @@ -211,7 +210,7 @@ func TestDiskFull(t *testing.T) { t.Fail() } - foo2, err := ioutil.ReadFile(mnt + "/foo2") + foo2, err := os.ReadFile(mnt + "/foo2") if err != nil { t.Fatal(err) } @@ -231,7 +230,7 @@ func TestAcl(t *testing.T) { defer test_helpers.UnmountPanic(pDir) f1 := pDir + "/f1" - if err := ioutil.WriteFile(f1, []byte("hello world\n"), 000); err != nil { + if err := os.WriteFile(f1, []byte("hello world\n"), 000); err != nil { t.Fatal(err) } -- cgit v1.2.3