From 9e031f90421acdedbb9edc1c41162908350498c7 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 28 Sep 2024 22:20:25 +1000 Subject: [PATCH] gorond --- cmd/torrent/main.go | 2 +- internal/ctxrw/ctxrw.go | 3 ++- metainfo/info_test.go | 2 +- mse/mse.go | 3 ++- ordered-bitmap.go | 3 ++- peer_protocol/handshake.go | 5 +++-- request-strategy/peer.go | 3 ++- tracker/udp/client.go | 2 +- 8 files changed, 14 insertions(+), 9 deletions(-) diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index a15351b979..3f5b82ccfa 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 @@ import ( "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 8ca19310b9..9fc0f5f476 100644 --- a/internal/ctxrw/ctxrw.go +++ b/internal/ctxrw/ctxrw.go @@ -2,8 +2,9 @@ package ctxrw import ( "context" - g "github.com/anacrolix/generics" "io" + + g "github.com/anacrolix/generics" ) type contextedReader struct { diff --git a/metainfo/info_test.go b/metainfo/info_test.go index 9fd3bdedfc..5949c89e22 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/mse/mse.go b/mse/mse.go index f1bd63b8a3..dddb0ff104 100644 --- a/mse/mse.go +++ b/mse/mse.go @@ -12,7 +12,6 @@ import ( "errors" "expvar" "fmt" - "github.com/anacrolix/torrent/internal/ctxrw" "io" "math" "math/big" @@ -20,6 +19,8 @@ import ( "sync" "github.com/anacrolix/missinggo/perf" + + "github.com/anacrolix/torrent/internal/ctxrw" ) const ( diff --git a/ordered-bitmap.go b/ordered-bitmap.go index f1d867ef1c..2163a37574 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 162047f3aa..d220abf4b6 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 a922feb310..1eea0329eb 100644 --- a/request-strategy/peer.go +++ b/request-strategy/peer.go @@ -1,8 +1,9 @@ package requestStrategy import ( - typedRoaring "github.com/anacrolix/torrent/typed-roaring" "iter" + + typedRoaring "github.com/anacrolix/torrent/typed-roaring" ) type PeerRequestState struct { diff --git a/tracker/udp/client.go b/tracker/udp/client.go index 4664643dd2..44d0513719 100644 --- a/tracker/udp/client.go +++ b/tracker/udp/client.go @@ -5,12 +5,12 @@ import ( "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