Skip to content

Commit

Permalink
lint: minor warns
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Apr 5, 2022
1 parent 75ce1fc commit 9af750d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/status/external/nginx_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package external
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"strconv"
"strings"
Expand Down Expand Up @@ -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()

Expand All @@ -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")
}
Expand Down

0 comments on commit 9af750d

Please sign in to comment.