From 195742c59323add05c38c22d7c9f960787fee7e9 Mon Sep 17 00:00:00 2001 From: Daisuke Maki Date: Wed, 12 Oct 2022 20:20:35 +0900 Subject: [PATCH] appease linter --- .golangci.yml | 1 + queue.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 8642432..6245509 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,6 +14,7 @@ linters: - dupl - exhaustive - exhaustivestruct + - exhaustruct - errorlint - funlen - gci diff --git a/queue.go b/queue.go index 897207b..84a1e3e 100644 --- a/queue.go +++ b/queue.go @@ -4,7 +4,7 @@ import ( "bytes" "context" "fmt" - "io/ioutil" + "io" "net/http" "sync" "time" @@ -50,7 +50,7 @@ func (f TransformFunc) Transform(u string, res *http.Response) (interface{}, err type BodyBytes struct{} func (BodyBytes) Transform(_ string, res *http.Response) (interface{}, error) { - buf, err := ioutil.ReadAll(res.Body) + buf, err := io.ReadAll(res.Body) defer res.Body.Close() if err != nil { return nil, fmt.Errorf(`failed to read response body: %w`, err)