mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
chore: replace usages of ioutil (#1792)
This commit is contained in:
parent
8aa41b8101
commit
72e437f173
2 changed files with 11 additions and 11 deletions
|
@ -2,18 +2,18 @@ package metrics_test
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"github.com/containrrr/watchtower/pkg/api"
|
||||
metricsAPI "github.com/containrrr/watchtower/pkg/api/metrics"
|
||||
"github.com/containrrr/watchtower/pkg/metrics"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -36,7 +36,7 @@ func getWithToken(handler http.Handler) map[string]string {
|
|||
handler.ServeHTTP(respWriter, req)
|
||||
|
||||
res := respWriter.Result()
|
||||
body, _ := ioutil.ReadAll(res.Body)
|
||||
body, _ := io.ReadAll(res.Body)
|
||||
|
||||
for _, line := range strings.Split(string(body), "\n") {
|
||||
if len(line) < 1 || line[0] == '#' {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue