cleanup(all): stop using deprecated ioutil functions (#381)
Spotted while working on https://github.com/ooni/probe/issues/1417 See https://golang.org/pkg/io/ioutil/
This commit is contained in:
parent
721ce95315
commit
fd5405ade1
25 changed files with 64 additions and 72 deletions
|
|
@ -3,7 +3,7 @@ package engine
|
|||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
|
|
@ -32,7 +32,7 @@ func TestSessionByteCounter(t *testing.T) {
|
|||
}
|
||||
defer resp.Body.Close()
|
||||
ctx := context.Background()
|
||||
if _, err := iox.CopyContext(ctx, ioutil.Discard, resp.Body); err != nil {
|
||||
if _, err := iox.CopyContext(ctx, io.Discard, resp.Body); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if s.KibiBytesSent() <= 0 || s.KibiBytesReceived() <= 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue