mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-07 17:47:14 +00:00
Replace uses of ioutil
ioutil package was deprecated in Go 1.16, replace all uses with their respective replacements. This patch was generated with a combination of `gofmt -r`, `eg`, and manually (for `ioutil.ReadDir`).
This commit is contained in:
@@ -2,7 +2,7 @@ package expvarom
|
||||
|
||||
import (
|
||||
"expvar"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
@@ -111,7 +111,7 @@ func TestHandler(t *testing.T) {
|
||||
MetricsHandler(w, req)
|
||||
|
||||
resp := w.Result()
|
||||
body, _ := ioutil.ReadAll(resp.Body)
|
||||
body, _ := io.ReadAll(resp.Body)
|
||||
|
||||
if diff := cmp.Diff(expected, string(body)); diff != "" {
|
||||
t.Errorf("MetricsHandler() mismatch (-want +got):\n%s", diff)
|
||||
|
||||
Reference in New Issue
Block a user