]> Sergey Matveev's repositories - btrtrc.git/blobdiff - tracker/udp_test.go
chore: remove refs to deprecated io/ioutil
[btrtrc.git] / tracker / udp_test.go
index 751e41b942b2c2d45f544087f7f6d6a622fec905..232aeb1973a51f0229b6591894473ea4a61c94c8 100644 (file)
@@ -6,7 +6,7 @@ import (
        "crypto/rand"
        "errors"
        "fmt"
-       "io/ioutil"
+       "io"
        "net"
        "net/url"
        "sync"
@@ -15,9 +15,10 @@ import (
 
        "github.com/anacrolix/dht/v2/krpc"
        _ "github.com/anacrolix/envpprof"
-       "github.com/anacrolix/torrent/tracker/udp"
        "github.com/stretchr/testify/assert"
        "github.com/stretchr/testify/require"
+
+       "github.com/anacrolix/torrent/tracker/udp"
 )
 
 var trackers = []string{
@@ -178,7 +179,7 @@ func TestURLPathOption(t *testing.T) {
        r = bytes.NewReader(b[:n])
        udp.Read(r, &h)
        udp.Read(r, &AnnounceRequest{})
-       all, _ := ioutil.ReadAll(r)
+       all, _ := io.ReadAll(r)
        if string(all) != "\x02\x09/announce" {
                t.FailNow()
        }