diff --git a/pkg/modules/chromium/chromium_test.go b/pkg/modules/chromium/chromium_test.go index 2990abcb..e5bfd9a6 100644 --- a/pkg/modules/chromium/chromium_test.go +++ b/pkg/modules/chromium/chromium_test.go @@ -3,7 +3,6 @@ package chromium import ( "context" "errors" - "io/ioutil" "os" "reflect" "regexp" @@ -399,7 +398,7 @@ func TestChromium_PDF(t *testing.T) { URL: "file:///tests/test/testdata/chromium/html/sample4/index.html", options: Options{ HeaderTemplate: func() string { - b, err := ioutil.ReadFile("/tests/test/testdata/chromium/url/sample2/header.html") + b, err := os.ReadFile("/tests/test/testdata/chromium/url/sample2/header.html") if err != nil { t.Fatalf("expected no error but got: %v", err) } @@ -407,7 +406,7 @@ func TestChromium_PDF(t *testing.T) { return string(b) }(), FooterTemplate: func() string { - b, err := ioutil.ReadFile("/tests/test/testdata/chromium/url/sample2/footer.html") + b, err := os.ReadFile("/tests/test/testdata/chromium/url/sample2/footer.html") if err != nil { t.Fatalf("expected no error but got: %v", err) } diff --git a/pkg/modules/webhook/middleware_test.go b/pkg/modules/webhook/middleware_test.go index a0ae588f..a88c5ba5 100644 --- a/pkg/modules/webhook/middleware_test.go +++ b/pkg/modules/webhook/middleware_test.go @@ -6,7 +6,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "math/rand" "mime/multipart" "net/http" @@ -450,7 +450,7 @@ func TestWebhookMiddlewareAsynchronousProcess(t *testing.T) { } if contentType == echo.MIMEApplicationJSONCharsetUTF8 { - body, err := ioutil.ReadAll(c.Request().Body) + body, err := io.ReadAll(c.Request().Body) if err != nil { errChan <- err return nil @@ -489,7 +489,7 @@ func TestWebhookMiddlewareAsynchronousProcess(t *testing.T) { t.Errorf("test %d: expected '%s' '%s' to contain '%s'", i, echo.HeaderContentDisposition, contentDisposition, tc.expectWebhookFilename) } - body, err := ioutil.ReadAll(c.Request().Body) + body, err := io.ReadAll(c.Request().Body) if err != nil { errChan <- err return nil