1
0
mirror of https://github.com/nginxinc/nginx-prometheus-exporter.git synced 2025-07-30 10:03:04 +03:00

Stop using io/ioutil

This commit is contained in:
inosato
2021-05-01 12:23:46 +09:00
parent a4656a8726
commit 8e98ee44b2
2 changed files with 3 additions and 4 deletions

View File

@ -2,7 +2,7 @@ package client
import (
"fmt"
"io/ioutil"
"io"
"net/http"
"strconv"
"strings"
@ -53,7 +53,7 @@ func (client *NginxClient) GetStubStats() (*StubStats, error) {
return nil, fmt.Errorf("expected %v response, got %v", http.StatusOK, resp.StatusCode)
}
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("failed to read the response body: %v", err)
}