mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 12:06:37 +00:00
Remove ioutil usage
This has been deprecated in Go for some time, in favour of the io package. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This commit is contained in:
@ -3,7 +3,7 @@ package metrics
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@ -44,7 +44,7 @@ func (q PrometheusQuery) Fetch(query string) (*VectorQueryResponse, error) {
|
||||
defer res.Body.Close()
|
||||
}
|
||||
|
||||
bytesOut, readErr := ioutil.ReadAll(res.Body)
|
||||
bytesOut, readErr := io.ReadAll(res.Body)
|
||||
if readErr != nil {
|
||||
return nil, readErr
|
||||
}
|
||||
|
Reference in New Issue
Block a user