summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/staticresp_test.go
diff options
context:
space:
mode:
authorKallyDev <36319157+kallydev@users.noreply.github.com>2021-09-30 01:17:48 +0800
committerGitHub <noreply@github.com>2021-09-29 11:17:48 -0600
commitc48fadc4a7655008d13076c7f757c36368e2ca13 (patch)
tree3fe2837e02e9b664dd5b86afbe42494ac20997f8 /modules/caddyhttp/staticresp_test.go
parent059fc32f002d00e980b438b3edbdf7b8bcdf9a90 (diff)
Move from deprecated ioutil to os and io packages (#4364)
Diffstat (limited to 'modules/caddyhttp/staticresp_test.go')
-rw-r--r--modules/caddyhttp/staticresp_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/caddyhttp/staticresp_test.go b/modules/caddyhttp/staticresp_test.go
index cd0d1a1..5844f43 100644
--- a/modules/caddyhttp/staticresp_test.go
+++ b/modules/caddyhttp/staticresp_test.go
@@ -16,7 +16,7 @@ package caddyhttp
import (
"context"
- "io/ioutil"
+ "io"
"net/http"
"net/http/httptest"
"strconv"
@@ -44,7 +44,7 @@ func TestStaticResponseHandler(t *testing.T) {
}
resp := w.Result()
- respBody, _ := ioutil.ReadAll(resp.Body)
+ respBody, _ := io.ReadAll(resp.Body)
if resp.StatusCode != http.StatusNotFound {
t.Errorf("expected status %d but got %d", http.StatusNotFound, resp.StatusCode)