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/reverseproxy_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'caddytest/integration/reverseproxy_test.go') diff --git a/caddytest/integration/reverseproxy_test.go b/caddytest/integration/reverseproxy_test.go index 422f671..ca11287 100644 --- a/caddytest/integration/reverseproxy_test.go +++ b/caddytest/integration/reverseproxy_test.go @@ -2,7 +2,6 @@ package integration import ( "fmt" - "io/ioutil" "net" "net/http" "os" @@ -85,7 +84,7 @@ func TestDialWithPlaceholderUnix(t *testing.T) { t.SkipNow() } - f, err := ioutil.TempFile("", "*.sock") + f, err := os.CreateTemp("", "*.sock") if err != nil { t.Errorf("failed to create TempFile: %s", err) return @@ -387,7 +386,7 @@ func TestReverseProxyHealthCheckUnixSocket(t *testing.T) { t.SkipNow() } tester := caddytest.NewTester(t) - f, err := ioutil.TempFile("", "*.sock") + f, err := os.CreateTemp("", "*.sock") if err != nil { t.Errorf("failed to create TempFile: %s", err) return @@ -442,7 +441,7 @@ func TestReverseProxyHealthCheckUnixSocketWithoutPort(t *testing.T) { t.SkipNow() } tester := caddytest.NewTester(t) - f, err := ioutil.TempFile("", "*.sock") + f, err := os.CreateTemp("", "*.sock") if err != nil { t.Errorf("failed to create TempFile: %s", err) return -- cgit v1.2.3