From 48c0b5f1653077bcb529c22aeaa95d4b01a582bf Mon Sep 17 00:00:00 2001 From: Sung Yoon Whang Date: Mon, 19 Dec 2022 06:50:12 -0800 Subject: Fix lint error issues (#65) Since upgrading to Go 1.19 we are seeing linter error due to usage of the deprecated io/ioutil package. This removes the usage of io/ioutil package. --- utils_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'utils_test.go') diff --git a/utils_test.go b/utils_test.go index d5a4f89..1388475 100644 --- a/utils_test.go +++ b/utils_test.go @@ -1,7 +1,6 @@ package main import ( - "io/ioutil" "net/http" "net/http/httptest" "os" @@ -14,7 +13,7 @@ import ( // TempFile persists contents and returns the path and a clean func func TempFile(t *testing.T, contents string) (path string, clean func()) { content := []byte(contents) - tmpfile, err := ioutil.TempFile("", "sally-tmp") + tmpfile, err := os.CreateTemp("", "sally-tmp") if err != nil { t.Fatal("Unable to create tmpfile", err) } -- cgit v1.2.3