aboutsummaryrefslogtreecommitdiff
path: root/weed/util/chunk_cache/chunk_cache_on_disk_test.go
diff options
context:
space:
mode:
authorEng Zer Jun <engzerjun@gmail.com>2021-10-14 12:27:58 +0800
committerEng Zer Jun <engzerjun@gmail.com>2021-10-14 12:27:58 +0800
commita23bcbb7ecf93fcda35976f4f2fb42a67830e718 (patch)
tree3227e82e51346dad8649a17e991c9cf561ef8071 /weed/util/chunk_cache/chunk_cache_on_disk_test.go
parent4cbd390fbe634e2370c36a61b1574e9d648c3cee (diff)
downloadseaweedfs-a23bcbb7ecf93fcda35976f4f2fb42a67830e718.tar.xz
seaweedfs-a23bcbb7ecf93fcda35976f4f2fb42a67830e718.zip
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated as of Go 1.16, see https://golang.org/doc/go1.16#ioutil. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Diffstat (limited to 'weed/util/chunk_cache/chunk_cache_on_disk_test.go')
-rw-r--r--weed/util/chunk_cache/chunk_cache_on_disk_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/weed/util/chunk_cache/chunk_cache_on_disk_test.go b/weed/util/chunk_cache/chunk_cache_on_disk_test.go
index f8325276e..7dccfd43f 100644
--- a/weed/util/chunk_cache/chunk_cache_on_disk_test.go
+++ b/weed/util/chunk_cache/chunk_cache_on_disk_test.go
@@ -3,7 +3,6 @@ package chunk_cache
import (
"bytes"
"fmt"
- "io/ioutil"
"math/rand"
"os"
"testing"
@@ -11,7 +10,7 @@ import (
func TestOnDisk(t *testing.T) {
- tmpDir, _ := ioutil.TempDir("", "c")
+ tmpDir, _ := os.MkdirTemp("", "c")
defer os.RemoveAll(tmpDir)
totalDiskSizeInKB := int64(32)