From c48fadc4a7655008d13076c7f757c36368e2ca13 Mon Sep 17 00:00:00 2001 From: KallyDev <36319157+kallydev@users.noreply.github.com> Date: Thu, 30 Sep 2021 01:17:48 +0800 Subject: Move from deprecated ioutil to os and io packages (#4364) --- caddytest/integration/caddyfile_adapt_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'caddytest/integration/caddyfile_adapt_test.go') diff --git a/caddytest/integration/caddyfile_adapt_test.go b/caddytest/integration/caddyfile_adapt_test.go index e109899..5b052df 100644 --- a/caddytest/integration/caddyfile_adapt_test.go +++ b/caddytest/integration/caddyfile_adapt_test.go @@ -3,7 +3,7 @@ package integration import ( jsonMod "encoding/json" "fmt" - "io/ioutil" + "os" "path/filepath" "regexp" "strings" @@ -14,7 +14,7 @@ import ( func TestCaddyfileAdaptToJSON(t *testing.T) { // load the list of test files from the dir - files, err := ioutil.ReadDir("./caddyfile_adapt") + files, err := os.ReadDir("./caddyfile_adapt") if err != nil { t.Errorf("failed to read caddyfile_adapt dir: %s", err) } @@ -29,7 +29,7 @@ func TestCaddyfileAdaptToJSON(t *testing.T) { // read the test file filename := f.Name() - data, err := ioutil.ReadFile("./caddyfile_adapt/" + filename) + data, err := os.ReadFile("./caddyfile_adapt/" + filename) if err != nil { t.Errorf("failed to read %s dir: %s", filename, err) } -- cgit v1.2.3