From cb1bf0f413ee6ca89eed976ae26ae9a75e785826 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 21 Aug 2019 20:58:40 +1000 Subject: [PATCH] goimports -local --- Peer.go | 1 + Peers.go | 1 + bencode/bench_test.go | 3 ++- client.go | 11 ++++++----- client_test.go | 1 + cmd/magnet-metainfo/main.go | 1 + cmd/torrent-create/main.go | 1 + cmd/torrent-infohash/main.go | 1 + cmd/torrent-magnet/main.go | 1 + cmd/torrent-metainfo-pprint/main.go | 3 ++- cmd/torrent-pick/main.go | 5 +++-- cmd/torrent-verify/main.go | 5 +++-- cmd/torrent/main.go | 7 ++++--- cmd/torrentfs/main.go | 1 + cmd/tracker-announce/main.go | 1 + config.go | 3 ++- conn_stats.go | 2 +- connection.go | 3 ++- connection_test.go | 5 +++-- fs/file_handle.go | 1 + fs/filenode.go | 1 + fs/torrentfs.go | 1 + fs/torrentfs_test.go | 5 +++-- internal/testutil/spec.go | 1 + iplist/cmd/iplist/main.go | 1 + iplist/cmd/pack-blocklist/main.go | 1 + issue211_test.go | 5 +++-- issue97_test.go | 3 ++- metainfo/info_test.go | 3 ++- metainfo/metainfo_test.go | 3 ++- metainfo/nodes_test.go | 3 ++- misc.go | 3 ++- peer_protocol/handshake.go | 1 + peer_protocol/pex_test.go | 3 ++- reader_test.go | 3 ++- storage/boltPieceCompletion.go | 3 ++- storage/bolt_piece.go | 3 ++- storage/boltdb.go | 3 ++- storage/boltpc_test.go | 3 ++- storage/file.go | 1 + storage/file_misc_test.go | 3 ++- storage/file_test.go | 3 ++- storage/issue95_test.go | 3 ++- storage/issue96_test.go | 3 ++- storage/mmap.go | 3 ++- storage/piece_resource.go | 1 + storage/sqlitePieceCompletion.go | 3 ++- storage/wrappers.go | 1 + t.go | 1 + torrent.go | 1 + torrent_test.go | 7 ++++--- tracker/http.go | 1 + tracker/http_test.go | 3 ++- tracker_scraper.go | 1 + util/dirwatch/dirwatch.go | 3 ++- 55 files changed, 99 insertions(+), 45 deletions(-) diff --git a/Peer.go b/Peer.go index 85f673b5..5f63e6ed 100644 --- a/Peer.go +++ b/Peer.go @@ -4,6 +4,7 @@ import ( "net" "github.com/anacrolix/dht/v2/krpc" + "github.com/anacrolix/torrent/peer_protocol" ) diff --git a/Peers.go b/Peers.go index 32d902fb..be702032 100644 --- a/Peers.go +++ b/Peers.go @@ -2,6 +2,7 @@ package torrent import ( "github.com/anacrolix/dht/v2/krpc" + "github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/tracker" ) diff --git a/bencode/bench_test.go b/bencode/bench_test.go index f89e44dc..f5fb0a7a 100644 --- a/bencode/bench_test.go +++ b/bencode/bench_test.go @@ -6,8 +6,9 @@ import ( "testing" "github.com/anacrolix/dht/v2/krpc" - "github.com/anacrolix/torrent/bencode" "github.com/bradfitz/iter" + + "github.com/anacrolix/torrent/bencode" ) func marshalAndUnmarshal(tb testing.TB, orig krpc.Msg) (ret krpc.Msg) { diff --git a/client.go b/client.go index 52e48bb4..4443c9af 100644 --- a/client.go +++ b/client.go @@ -27,17 +27,18 @@ import ( "github.com/anacrolix/missinggo/pubsub" "github.com/anacrolix/missinggo/slices" "github.com/anacrolix/sync" + "github.com/davecgh/go-spew/spew" + "github.com/dustin/go-humanize" + "github.com/google/btree" + "golang.org/x/time/rate" + "golang.org/x/xerrors" + "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/iplist" "github.com/anacrolix/torrent/metainfo" "github.com/anacrolix/torrent/mse" pp "github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/storage" - "github.com/davecgh/go-spew/spew" - "github.com/dustin/go-humanize" - "github.com/google/btree" - "golang.org/x/time/rate" - "golang.org/x/xerrors" ) // Clients contain zero or more Torrents. A Client manages a blocklist, the diff --git a/client_test.go b/client_test.go index b896ed7b..b84b9f3b 100644 --- a/client_test.go +++ b/client_test.go @@ -21,6 +21,7 @@ import ( _ "github.com/anacrolix/envpprof" "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/filecache" + "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/iplist" diff --git a/cmd/magnet-metainfo/main.go b/cmd/magnet-metainfo/main.go index 88965137..536f7abf 100644 --- a/cmd/magnet-metainfo/main.go +++ b/cmd/magnet-metainfo/main.go @@ -9,6 +9,7 @@ import ( _ "github.com/anacrolix/envpprof" "github.com/anacrolix/tagflag" + "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/bencode" ) diff --git a/cmd/torrent-create/main.go b/cmd/torrent-create/main.go index f28e6f43..d36dd0b5 100644 --- a/cmd/torrent-create/main.go +++ b/cmd/torrent-create/main.go @@ -5,6 +5,7 @@ import ( "os" "github.com/anacrolix/tagflag" + "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/metainfo" ) diff --git a/cmd/torrent-infohash/main.go b/cmd/torrent-infohash/main.go index 10a7bad9..81319c99 100644 --- a/cmd/torrent-infohash/main.go +++ b/cmd/torrent-infohash/main.go @@ -5,6 +5,7 @@ import ( "log" "github.com/anacrolix/tagflag" + "github.com/anacrolix/torrent/metainfo" ) diff --git a/cmd/torrent-magnet/main.go b/cmd/torrent-magnet/main.go index 3d4bf137..7be1e4af 100644 --- a/cmd/torrent-magnet/main.go +++ b/cmd/torrent-magnet/main.go @@ -5,6 +5,7 @@ import ( "os" "github.com/anacrolix/tagflag" + "github.com/anacrolix/torrent/metainfo" ) diff --git a/cmd/torrent-metainfo-pprint/main.go b/cmd/torrent-metainfo-pprint/main.go index 73532ee3..9970b7b8 100644 --- a/cmd/torrent-metainfo-pprint/main.go +++ b/cmd/torrent-metainfo-pprint/main.go @@ -11,8 +11,9 @@ import ( "github.com/anacrolix/envpprof" "github.com/anacrolix/tagflag" - "github.com/anacrolix/torrent/metainfo" "github.com/bradfitz/iter" + + "github.com/anacrolix/torrent/metainfo" ) var flags struct { diff --git a/cmd/torrent-pick/main.go b/cmd/torrent-pick/main.go index 07874e8a..eada5687 100644 --- a/cmd/torrent-pick/main.go +++ b/cmd/torrent-pick/main.go @@ -15,10 +15,11 @@ import ( "time" _ "github.com/anacrolix/envpprof" - "github.com/anacrolix/torrent" - "github.com/anacrolix/torrent/metainfo" "github.com/dustin/go-humanize" "github.com/jessevdk/go-flags" + + "github.com/anacrolix/torrent" + "github.com/anacrolix/torrent/metainfo" ) // fmt.Fprintf(os.Stderr, "Usage: %s \n", os.Args[0]) diff --git a/cmd/torrent-verify/main.go b/cmd/torrent-verify/main.go index 525cced8..dfd14a74 100644 --- a/cmd/torrent-verify/main.go +++ b/cmd/torrent-verify/main.go @@ -10,10 +10,11 @@ import ( "path/filepath" "github.com/anacrolix/tagflag" - "github.com/anacrolix/torrent/metainfo" - "github.com/anacrolix/torrent/mmap_span" "github.com/bradfitz/iter" "github.com/edsrzf/mmap-go" + + "github.com/anacrolix/torrent/metainfo" + "github.com/anacrolix/torrent/mmap_span" ) func mmapFile(name string) (mm mmap.MMap, err error) { diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index caac4855..8e86ae97 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -15,13 +15,14 @@ import ( "github.com/anacrolix/envpprof" "github.com/anacrolix/tagflag" + humanize "github.com/dustin/go-humanize" + "github.com/gosuri/uiprogress" + "golang.org/x/time/rate" + "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/iplist" "github.com/anacrolix/torrent/metainfo" "github.com/anacrolix/torrent/storage" - humanize "github.com/dustin/go-humanize" - "github.com/gosuri/uiprogress" - "golang.org/x/time/rate" ) var progress = uiprogress.New() diff --git a/cmd/torrentfs/main.go b/cmd/torrentfs/main.go index 5a02cec2..b2d34efe 100644 --- a/cmd/torrentfs/main.go +++ b/cmd/torrentfs/main.go @@ -17,6 +17,7 @@ import ( fusefs "bazil.org/fuse/fs" _ "github.com/anacrolix/envpprof" "github.com/anacrolix/tagflag" + "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/fs" "github.com/anacrolix/torrent/util/dirwatch" diff --git a/cmd/tracker-announce/main.go b/cmd/tracker-announce/main.go index 4c029c39..bfe12143 100644 --- a/cmd/tracker-announce/main.go +++ b/cmd/tracker-announce/main.go @@ -9,6 +9,7 @@ import ( "github.com/davecgh/go-spew/spew" "github.com/anacrolix/tagflag" + "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/metainfo" "github.com/anacrolix/torrent/tracker" diff --git a/config.go b/config.go index 9f0fdc3f..f1131195 100644 --- a/config.go +++ b/config.go @@ -12,10 +12,11 @@ import ( "github.com/anacrolix/missinggo" "github.com/anacrolix/missinggo/conntrack" "github.com/anacrolix/missinggo/expect" + "golang.org/x/time/rate" + "github.com/anacrolix/torrent/iplist" "github.com/anacrolix/torrent/mse" "github.com/anacrolix/torrent/storage" - "golang.org/x/time/rate" ) var DefaultHTTPUserAgent = "Go-Torrent/1.0" diff --git a/conn_stats.go b/conn_stats.go index 06ec23f2..3a0216f5 100644 --- a/conn_stats.go +++ b/conn_stats.go @@ -1,11 +1,11 @@ package torrent import ( + "encoding/json" "fmt" "io" "reflect" "sync/atomic" - "encoding/json" pp "github.com/anacrolix/torrent/peer_protocol" ) diff --git a/connection.go b/connection.go index 7fec0a43..397be949 100644 --- a/connection.go +++ b/connection.go @@ -19,10 +19,11 @@ import ( "github.com/anacrolix/missinggo/bitmap" "github.com/anacrolix/missinggo/iter" "github.com/anacrolix/missinggo/prioritybitmap" + "github.com/pkg/errors" + "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/mse" pp "github.com/anacrolix/torrent/peer_protocol" - "github.com/pkg/errors" ) type peerSource string diff --git a/connection_test.go b/connection_test.go index ffc48200..56a07f03 100644 --- a/connection_test.go +++ b/connection_test.go @@ -8,11 +8,12 @@ import ( "time" "github.com/anacrolix/missinggo/pubsub" + "github.com/bradfitz/iter" + "github.com/stretchr/testify/require" + "github.com/anacrolix/torrent/metainfo" pp "github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/storage" - "github.com/bradfitz/iter" - "github.com/stretchr/testify/require" ) // Ensure that no race exists between sending a bitfield, and a subsequent diff --git a/fs/file_handle.go b/fs/file_handle.go index 48f3e507..41517296 100644 --- a/fs/file_handle.go +++ b/fs/file_handle.go @@ -7,6 +7,7 @@ import ( "bazil.org/fuse" "bazil.org/fuse/fs" "github.com/anacrolix/missinggo" + "github.com/anacrolix/torrent" ) diff --git a/fs/filenode.go b/fs/filenode.go index b3f513f4..a7c807b4 100644 --- a/fs/filenode.go +++ b/fs/filenode.go @@ -5,6 +5,7 @@ import ( "bazil.org/fuse" fusefs "bazil.org/fuse/fs" + "github.com/anacrolix/torrent" ) diff --git a/fs/torrentfs.go b/fs/torrentfs.go index 47dfffc0..843e2f16 100644 --- a/fs/torrentfs.go +++ b/fs/torrentfs.go @@ -9,6 +9,7 @@ import ( "bazil.org/fuse" fusefs "bazil.org/fuse/fs" + "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/metainfo" ) diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index 55fd7c97..3c152cbf 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -17,12 +17,13 @@ import ( fusefs "bazil.org/fuse/fs" _ "github.com/anacrolix/envpprof" "github.com/anacrolix/missinggo" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/metainfo" "github.com/anacrolix/torrent/storage" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func init() { diff --git a/internal/testutil/spec.go b/internal/testutil/spec.go index 90accb40..b2daa48b 100644 --- a/internal/testutil/spec.go +++ b/internal/testutil/spec.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/anacrolix/missinggo/expect" + "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/metainfo" ) diff --git a/iplist/cmd/iplist/main.go b/iplist/cmd/iplist/main.go index b46ce215..d7bfbeef 100644 --- a/iplist/cmd/iplist/main.go +++ b/iplist/cmd/iplist/main.go @@ -7,6 +7,7 @@ import ( "os" "github.com/anacrolix/tagflag" + "github.com/anacrolix/torrent/iplist" ) diff --git a/iplist/cmd/pack-blocklist/main.go b/iplist/cmd/pack-blocklist/main.go index 6ca81e05..037ceeba 100644 --- a/iplist/cmd/pack-blocklist/main.go +++ b/iplist/cmd/pack-blocklist/main.go @@ -8,6 +8,7 @@ import ( "github.com/anacrolix/missinggo" "github.com/anacrolix/tagflag" + "github.com/anacrolix/torrent/iplist" ) diff --git a/issue211_test.go b/issue211_test.go index c12a9c9e..dedbaa56 100644 --- a/issue211_test.go +++ b/issue211_test.go @@ -5,11 +5,12 @@ import ( "io/ioutil" "testing" - "github.com/anacrolix/torrent/internal/testutil" - "github.com/anacrolix/torrent/storage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "golang.org/x/time/rate" + + "github.com/anacrolix/torrent/internal/testutil" + "github.com/anacrolix/torrent/storage" ) func TestDropTorrentWithMmapStorageWhileHashing(t *testing.T) { diff --git a/issue97_test.go b/issue97_test.go index 5f36e67f..5ccfa62e 100644 --- a/issue97_test.go +++ b/issue97_test.go @@ -5,9 +5,10 @@ import ( "os" "testing" + "github.com/stretchr/testify/require" + "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/storage" - "github.com/stretchr/testify/require" ) func TestHashPieceAfterStorageClosed(t *testing.T) { diff --git a/metainfo/info_test.go b/metainfo/info_test.go index 603fe800..d65ac2f1 100644 --- a/metainfo/info_test.go +++ b/metainfo/info_test.go @@ -3,8 +3,9 @@ package metainfo import ( "testing" - "github.com/anacrolix/torrent/bencode" "github.com/stretchr/testify/assert" + + "github.com/anacrolix/torrent/bencode" ) func TestMarshalInfo(t *testing.T) { diff --git a/metainfo/metainfo_test.go b/metainfo/metainfo_test.go index 5521f919..e54447ae 100644 --- a/metainfo/metainfo_test.go +++ b/metainfo/metainfo_test.go @@ -9,9 +9,10 @@ import ( "testing" "github.com/anacrolix/missinggo" - "github.com/anacrolix/torrent/bencode" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/bencode" ) func testFile(t *testing.T, filename string) { diff --git a/metainfo/nodes_test.go b/metainfo/nodes_test.go index 3e54b961..adebbb36 100644 --- a/metainfo/nodes_test.go +++ b/metainfo/nodes_test.go @@ -4,9 +4,10 @@ import ( "bytes" "testing" - "github.com/anacrolix/torrent/bencode" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/bencode" ) func testFileNodesMatch(t *testing.T, file string, nodes []Node) { diff --git a/misc.go b/misc.go index 7e73e723..bdf53189 100644 --- a/misc.go +++ b/misc.go @@ -5,9 +5,10 @@ import ( "net" "github.com/anacrolix/missinggo" + "golang.org/x/time/rate" + "github.com/anacrolix/torrent/metainfo" pp "github.com/anacrolix/torrent/peer_protocol" - "golang.org/x/time/rate" ) type chunkSpec struct { diff --git a/peer_protocol/handshake.go b/peer_protocol/handshake.go index d165f7a0..09d9343e 100644 --- a/peer_protocol/handshake.go +++ b/peer_protocol/handshake.go @@ -8,6 +8,7 @@ import ( "golang.org/x/xerrors" "github.com/anacrolix/missinggo" + "github.com/anacrolix/torrent/metainfo" ) diff --git a/peer_protocol/pex_test.go b/peer_protocol/pex_test.go index 19cd66bf..0c2b9f9e 100644 --- a/peer_protocol/pex_test.go +++ b/peer_protocol/pex_test.go @@ -3,8 +3,9 @@ package peer_protocol import ( "testing" - "github.com/anacrolix/torrent/bencode" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/bencode" ) func TestUnmarshalPex(t *testing.T) { diff --git a/reader_test.go b/reader_test.go index c8ea81d8..86021dd6 100644 --- a/reader_test.go +++ b/reader_test.go @@ -5,8 +5,9 @@ import ( "testing" "time" - "github.com/anacrolix/torrent/internal/testutil" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/internal/testutil" ) func TestReaderReadContext(t *testing.T) { diff --git a/storage/boltPieceCompletion.go b/storage/boltPieceCompletion.go index f0e21dc1..d0accb1d 100644 --- a/storage/boltPieceCompletion.go +++ b/storage/boltPieceCompletion.go @@ -6,8 +6,9 @@ import ( "path/filepath" "time" - "github.com/anacrolix/torrent/metainfo" "github.com/boltdb/bolt" + + "github.com/anacrolix/torrent/metainfo" ) const ( diff --git a/storage/bolt_piece.go b/storage/bolt_piece.go index a9e22bba..35120e0e 100644 --- a/storage/bolt_piece.go +++ b/storage/bolt_piece.go @@ -4,8 +4,9 @@ import ( "encoding/binary" "github.com/anacrolix/missinggo/x" - "github.com/anacrolix/torrent/metainfo" "github.com/boltdb/bolt" + + "github.com/anacrolix/torrent/metainfo" ) type boltDBPiece struct { diff --git a/storage/boltdb.go b/storage/boltdb.go index 30f38c65..56c711ff 100644 --- a/storage/boltdb.go +++ b/storage/boltdb.go @@ -6,8 +6,9 @@ import ( "time" "github.com/anacrolix/missinggo/expect" - "github.com/anacrolix/torrent/metainfo" "github.com/boltdb/bolt" + + "github.com/anacrolix/torrent/metainfo" ) const ( diff --git a/storage/boltpc_test.go b/storage/boltpc_test.go index cce7c910..53fdbdb5 100644 --- a/storage/boltpc_test.go +++ b/storage/boltpc_test.go @@ -5,9 +5,10 @@ import ( "os" "testing" - "github.com/anacrolix/torrent/metainfo" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/metainfo" ) func TestBoltPieceCompletion(t *testing.T) { diff --git a/storage/file.go b/storage/file.go index d01b53af..fd4d5601 100644 --- a/storage/file.go +++ b/storage/file.go @@ -6,6 +6,7 @@ import ( "path/filepath" "github.com/anacrolix/missinggo" + "github.com/anacrolix/torrent/metainfo" ) diff --git a/storage/file_misc_test.go b/storage/file_misc_test.go index 9c646345..8b453045 100644 --- a/storage/file_misc_test.go +++ b/storage/file_misc_test.go @@ -3,8 +3,9 @@ package storage import ( "testing" - "github.com/anacrolix/torrent/metainfo" "github.com/stretchr/testify/assert" + + "github.com/anacrolix/torrent/metainfo" ) func TestExtentCompleteRequiredLengths(t *testing.T) { diff --git a/storage/file_test.go b/storage/file_test.go index 719b98f2..1a5e1b60 100644 --- a/storage/file_test.go +++ b/storage/file_test.go @@ -9,9 +9,10 @@ import ( "testing" "github.com/anacrolix/missinggo" - "github.com/anacrolix/torrent/metainfo" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/metainfo" ) func TestShortFile(t *testing.T) { diff --git a/storage/issue95_test.go b/storage/issue95_test.go index 9043eb4e..d47410da 100644 --- a/storage/issue95_test.go +++ b/storage/issue95_test.go @@ -6,9 +6,10 @@ import ( "testing" "github.com/anacrolix/missinggo/resource" - "github.com/anacrolix/torrent/metainfo" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/metainfo" ) // Two different torrents opened from the same storage. Closing one should not diff --git a/storage/issue96_test.go b/storage/issue96_test.go index 21158f99..1bdbbf15 100644 --- a/storage/issue96_test.go +++ b/storage/issue96_test.go @@ -5,8 +5,9 @@ import ( "os" "testing" - "github.com/anacrolix/torrent/metainfo" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/metainfo" ) func testMarkedCompleteMissingOnRead(t *testing.T, csf func(string) ClientImpl) { diff --git a/storage/mmap.go b/storage/mmap.go index 53455467..8bce4dc7 100644 --- a/storage/mmap.go +++ b/storage/mmap.go @@ -8,9 +8,10 @@ import ( "path/filepath" "github.com/anacrolix/missinggo" + "github.com/edsrzf/mmap-go" + "github.com/anacrolix/torrent/metainfo" "github.com/anacrolix/torrent/mmap_span" - "github.com/edsrzf/mmap-go" ) type mmapClientImpl struct { diff --git a/storage/piece_resource.go b/storage/piece_resource.go index 8f6f9063..1064fae5 100644 --- a/storage/piece_resource.go +++ b/storage/piece_resource.go @@ -4,6 +4,7 @@ import ( "path" "github.com/anacrolix/missinggo/resource" + "github.com/anacrolix/torrent/metainfo" ) diff --git a/storage/sqlitePieceCompletion.go b/storage/sqlitePieceCompletion.go index 5a859d23..508b4fa4 100644 --- a/storage/sqlitePieceCompletion.go +++ b/storage/sqlitePieceCompletion.go @@ -6,8 +6,9 @@ import ( "database/sql" "path/filepath" - "github.com/anacrolix/torrent/metainfo" _ "github.com/mattn/go-sqlite3" + + "github.com/anacrolix/torrent/metainfo" ) type sqlitePieceCompletion struct { diff --git a/storage/wrappers.go b/storage/wrappers.go index c706e8dc..4fc0e10d 100644 --- a/storage/wrappers.go +++ b/storage/wrappers.go @@ -5,6 +5,7 @@ import ( "os" "github.com/anacrolix/missinggo" + "github.com/anacrolix/torrent/metainfo" ) diff --git a/t.go b/t.go index cd8bc10c..6b553f96 100644 --- a/t.go +++ b/t.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/anacrolix/missinggo/pubsub" + "github.com/anacrolix/torrent/metainfo" ) diff --git a/torrent.go b/torrent.go index d865ac60..70c8d420 100644 --- a/torrent.go +++ b/torrent.go @@ -24,6 +24,7 @@ import ( "github.com/anacrolix/missinggo/prioritybitmap" "github.com/anacrolix/missinggo/pubsub" "github.com/anacrolix/missinggo/slices" + "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/metainfo" pp "github.com/anacrolix/torrent/peer_protocol" diff --git a/torrent_test.go b/torrent_test.go index 300929d3..9502b57e 100644 --- a/torrent_test.go +++ b/torrent_test.go @@ -8,14 +8,15 @@ import ( "testing" "github.com/anacrolix/missinggo" + "github.com/bradfitz/iter" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/anacrolix/torrent/bencode" "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/metainfo" pp "github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/storage" - "github.com/bradfitz/iter" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func r(i, b, l pp.Integer) request { diff --git a/tracker/http.go b/tracker/http.go index ee365de7..11f88d64 100644 --- a/tracker/http.go +++ b/tracker/http.go @@ -14,6 +14,7 @@ import ( "github.com/anacrolix/dht/v2/krpc" "github.com/anacrolix/missinggo/httptoo" + "github.com/anacrolix/torrent/bencode" ) diff --git a/tracker/http_test.go b/tracker/http_test.go index 1defeb85..c90a35ef 100644 --- a/tracker/http_test.go +++ b/tracker/http_test.go @@ -3,9 +3,10 @@ package tracker import ( "testing" - "github.com/anacrolix/torrent/bencode" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/anacrolix/torrent/bencode" ) var defaultHTTPUserAgent = "Go-Torrent" diff --git a/tracker_scraper.go b/tracker_scraper.go index 2c64390a..728365de 100644 --- a/tracker_scraper.go +++ b/tracker_scraper.go @@ -9,6 +9,7 @@ import ( "time" "github.com/anacrolix/dht/v2/krpc" + "github.com/anacrolix/torrent/tracker" ) diff --git a/util/dirwatch/dirwatch.go b/util/dirwatch/dirwatch.go index 3f784a73..018d3f42 100644 --- a/util/dirwatch/dirwatch.go +++ b/util/dirwatch/dirwatch.go @@ -10,8 +10,9 @@ import ( "strings" "github.com/anacrolix/missinggo" - "github.com/anacrolix/torrent/metainfo" "github.com/fsnotify/fsnotify" + + "github.com/anacrolix/torrent/metainfo" ) type Change uint -- 2.48.1