From 9af750d88f82c267c221b39406e476c0fd6b8eab Mon Sep 17 00:00:00 2001 From: Umputun Date: Mon, 4 Apr 2022 20:03:29 -0500 Subject: [PATCH] lint: minor warns --- app/status/external/nginx_provider.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/status/external/nginx_provider.go b/app/status/external/nginx_provider.go index c63525f..43781a1 100644 --- a/app/status/external/nginx_provider.go +++ b/app/status/external/nginx_provider.go @@ -3,7 +3,6 @@ package external import ( "fmt" "io" - "io/ioutil" "net/http" "strconv" "strings" @@ -40,7 +39,7 @@ func (n *NginxProvider) Status(req Request) (*Response, error) { return nil, errors.Wrapf(err, "both https and http failed for %s", req.URL) } } - defer resp.Body.Close() // nolint: errcheck + defer resp.Body.Close() // nolint result.StatusCode = resp.StatusCode result.ResponseTime = time.Since(st).Milliseconds() @@ -58,7 +57,7 @@ func (n *NginxProvider) Status(req Request) (*Response, error) { func (n *NginxProvider) parseResponse(r io.Reader) (map[string]interface{}, error) { result := make(map[string]interface{}) - body, err := ioutil.ReadAll(r) + body, err := io.ReadAll(r) if err != nil { return nil, errors.Wrap(err, "failed to read response") }