You've already forked nginx_exporter
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:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user