cmd/torrent/main.go | 2 +- internal/ctxrw/ctxrw.go | 3 ++- metainfo/info_test.go | 2 +- ordered-bitmap.go | 3 ++- peer_protocol/handshake.go | 5 +++-- request-strategy/peer.go | 3 ++- tracker/udp/client.go | 2 +- diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index a15351b979dbb44539268c2e9d59aba37a85010d..3f5b82ccfadb9f1dba41e6db9c99b30cdc758180 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -5,7 +5,6 @@ import ( "context" "encoding/json" "fmt" - app "github.com/anacrolix/gostdapp" "io" stdLog "log" "net/http" @@ -14,6 +13,7 @@ "time" "github.com/anacrolix/bargle" "github.com/anacrolix/envpprof" + app "github.com/anacrolix/gostdapp" "github.com/anacrolix/log" xprometheus "github.com/anacrolix/missinggo/v2/prometheus" "github.com/davecgh/go-spew/spew" diff --git a/internal/ctxrw/ctxrw.go b/internal/ctxrw/ctxrw.go index 8ca19310b9da62248d534e8870e7158f671ae8c6..9fc0f5f476ac1004dfa7ac4f1ac6597eec01616a 100644 --- a/internal/ctxrw/ctxrw.go +++ b/internal/ctxrw/ctxrw.go @@ -2,8 +2,9 @@ package ctxrw import ( "context" + "io" + g "github.com/anacrolix/generics" - "io" ) type contextedReader struct { diff --git a/metainfo/info_test.go b/metainfo/info_test.go index 9fd3bdedfc08ecb7dcd338f4423fe9855abbeec1..5949c89e2253ff220d3e55695e116cc735905f0b 100644 --- a/metainfo/info_test.go +++ b/metainfo/info_test.go @@ -1,9 +1,9 @@ package metainfo import ( - g "github.com/anacrolix/generics" "testing" + g "github.com/anacrolix/generics" "github.com/stretchr/testify/assert" "github.com/anacrolix/torrent/bencode" diff --git a/ordered-bitmap.go b/ordered-bitmap.go index f1d867ef1ce1be1342a238d43125984a3e7e977c..2163a37574273305ca9dd4a9722e11be8d81358d 100644 --- a/ordered-bitmap.go +++ b/ordered-bitmap.go @@ -1,9 +1,10 @@ package torrent import ( + "iter" + g "github.com/anacrolix/generics" list "github.com/bahlo/generic-list-go" - "iter" "github.com/anacrolix/torrent/typed-roaring" ) diff --git a/peer_protocol/handshake.go b/peer_protocol/handshake.go index 162047f3aae9c9614481f86980ffd90ea619604d..d220abf4b613f5d07a67007428ec5dd79b010d98 100644 --- a/peer_protocol/handshake.go +++ b/peer_protocol/handshake.go @@ -4,13 +4,14 @@ import ( "context" "encoding/hex" "fmt" - "github.com/anacrolix/missinggo/v2/panicif" - "github.com/anacrolix/torrent/internal/ctxrw" "io" "math/bits" "strings" "unsafe" + "github.com/anacrolix/missinggo/v2/panicif" + + "github.com/anacrolix/torrent/internal/ctxrw" "github.com/anacrolix/torrent/metainfo" ) diff --git a/request-strategy/peer.go b/request-strategy/peer.go index a922feb31066ab8f822597b73b9529f8ad51d38c..1eea0329ebf6148916da7e41c169112f409c59f5 100644 --- a/request-strategy/peer.go +++ b/request-strategy/peer.go @@ -1,8 +1,9 @@ package requestStrategy import ( + "iter" + typedRoaring "github.com/anacrolix/torrent/typed-roaring" - "iter" ) type PeerRequestState struct { diff --git a/tracker/udp/client.go b/tracker/udp/client.go index 4664643dd244d65c958e508ce7eac15ef93d0d16..44d051371922859a3fa9d6116610ab47e988e799 100644 --- a/tracker/udp/client.go +++ b/tracker/udp/client.go @@ -5,12 +5,12 @@ "bytes" "context" "encoding/binary" "fmt" - "github.com/protolambda/ctxlock" "io" "net" "time" "github.com/anacrolix/dht/v2/krpc" + "github.com/protolambda/ctxlock" ) // Client interacts with UDP trackers via its Writer and Dispatcher. It has no knowledge of