Skip to content

Commit 0d5bb36

Browse files
committed
make lint happy
Signed-off-by: Alan Protasio <approtas@amazon.com>
1 parent f7b78a1 commit 0d5bb36

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/querier/tripperware/query.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"compress/gzip"
66
"context"
77
"encoding/json"
8-
"io/ioutil"
8+
"io"
99
"net/http"
1010
"sort"
1111
"strconv"
@@ -166,14 +166,15 @@ func BodyBuffer(res *http.Response) ([]byte, error) {
166166
}
167167
}
168168

169+
// if the response is gziped, lets unzip it here
169170
if strings.EqualFold(res.Header.Get("Content-Encoding"), "gzip") {
170171
gReader, err := gzip.NewReader(buf)
171172

172173
if err != nil {
173174
return nil, err
174175
}
175176

176-
return ioutil.ReadAll(gReader)
177+
return io.ReadAll(gReader)
177178
}
178179

179180
return buf.Bytes(), nil

0 commit comments

Comments
 (0)