diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-08-05 10:26:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-05 10:26:59 +0100 |
commit | c8935fb53f122b367eda61ec7811c406193d29ba (patch) | |
tree | 928c78461943f180dde6b2b4e4cd1d26792248f1 /federationapi | |
parent | 1b7f84250a46b401eccb89acafdef1b379f2dbc0 (diff) |
Do not use `ioutil` as it is deprecated (#2625)
Diffstat (limited to 'federationapi')
-rw-r--r-- | federationapi/federationapi_keys_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/federationapi/federationapi_keys_test.go b/federationapi/federationapi_keys_test.go index d1bfe184..9c344622 100644 --- a/federationapi/federationapi_keys_test.go +++ b/federationapi/federationapi_keys_test.go @@ -6,7 +6,7 @@ import ( "crypto/ed25519" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "os" "testing" @@ -66,7 +66,7 @@ func TestMain(m *testing.M) { s.cache = caching.NewRistrettoCache(8*1024*1024, time.Hour, false) // Create a temporary directory for JetStream. - d, err := ioutil.TempDir("./", "jetstream*") + d, err := os.MkdirTemp("./", "jetstream*") if err != nil { panic(err) } @@ -136,7 +136,7 @@ func (m *MockRoundTripper) RoundTrip(req *http.Request) (res *http.Response, err // And respond. res = &http.Response{ StatusCode: 200, - Body: ioutil.NopCloser(bytes.NewReader(body)), + Body: io.NopCloser(bytes.NewReader(body)), } return } |