From 3586ed65b73b732295fa3ef63877c89b51ec6e31 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 19 Jun 2023 00:14:41 +0200 Subject: golangci fixes --- external/evcli/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'external/evcli/client.go') diff --git a/external/evcli/client.go b/external/evcli/client.go index 8127dff..b9d5032 100644 --- a/external/evcli/client.go +++ b/external/evcli/client.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net/http" "net/url" @@ -34,6 +33,7 @@ func NewClient(config *APIConfig) (*Client, error) { } if err != nil { + return nil, err } return client, nil @@ -75,7 +75,7 @@ func (c *Client) SendRequest(method string, relURI *url.URL, body, dest interfac } defer res.Body.Close() - resBody, err := ioutil.ReadAll(res.Body) + resBody, err := io.ReadAll(res.Body) if err != nil { return fmt.Errorf("cannot read response body: %w", err) } -- cgit v1.2.3