mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
refactor: change deprecated "io/ioutil" package to recommended "io" package
This commit is contained in:
parent
35984c0876
commit
acce1f1fd9
14 changed files with 25 additions and 39 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"testing"
|
||||
|
@ -32,7 +31,7 @@ func (t *mockTransport) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||
return &http.Response{
|
||||
Status: fmt.Sprintf("%d %s", t.statusCode, http.StatusText(t.statusCode)),
|
||||
StatusCode: t.statusCode,
|
||||
Body: ioutil.NopCloser(bytes.NewReader(t.body)),
|
||||
Body: io.NopCloser(bytes.NewReader(t.body)),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue