mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Replace ioutil with io and os (#10541)
* Replace ioutil with io and os * Fix build errors
This commit is contained in:
committed by
GitHub
parent
982de94428
commit
d2f4a8cc7c
@@ -2,7 +2,7 @@ package prometheus_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -73,7 +73,7 @@ func TestLogrusCollector(t *testing.T) {
|
||||
func metrics(t *testing.T) []string {
|
||||
resp, err := http.Get(fmt.Sprintf("http://%s/metrics", addr))
|
||||
require.NoError(t, err)
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
require.NoError(t, err)
|
||||
return strings.Split(string(body), "\n")
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package prometheus
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
|
||||
func init() {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
logrus.SetOutput(ioutil.Discard)
|
||||
logrus.SetOutput(io.Discard)
|
||||
}
|
||||
|
||||
func TestLifecycle(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user