client.go | 9 ++++----- client_test.go | 7 +++---- cmd/torrent-verify/main.go | 3 ++- cmd/torrent/main.go | 7 ++----- cmd/torrentfs/main.go | 7 +++---- connection.go | 2 ++ connection_test.go | 4 +--- data/blob/store.go | 3 ++- data/mmap/mmap.go | 3 ++- dht/dht.go | 5 +++-- dht/getpeers.go | 6 +++--- fs/torrentfs.go | 4 ++-- fs/torrentfs_test.go | 11 ++++------- mse/mse.go | 4 ++-- mse/mse_test.go | 3 +-- torrent.go | 4 ++-- util/dirwatch/dirwatch.go | 5 +++-- diff --git a/client.go b/client.go index 50fe4691a49afa2ff88fe28ed1cd8eec3286f8fa..5c49565cadfc47ab7f4c4adf3ca5d479971a83a1 100644 --- a/client.go +++ b/client.go @@ -38,24 +38,23 @@ "strings" "syscall" "time" - "github.com/bradfitz/iter" - - "github.com/anacrolix/torrent/mse" - "github.com/anacrolix/libtorgo/bencode" "github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/sync" + "github.com/anacrolix/utp" + "github.com/bradfitz/iter" + "github.com/anacrolix/torrent/data" filePkg "github.com/anacrolix/torrent/data/file" "github.com/anacrolix/torrent/dht" "github.com/anacrolix/torrent/internal/pieceordering" "github.com/anacrolix/torrent/iplist" "github.com/anacrolix/torrent/logonce" + "github.com/anacrolix/torrent/mse" pp "github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/tracker" _ "github.com/anacrolix/torrent/tracker/udp" . "github.com/anacrolix/torrent/util" - "github.com/anacrolix/utp" ) var ( diff --git a/client_test.go b/client_test.go index a3f1fda210a2c38b3722b00a9fa0ccc7dea97d4f..447d941487449edb28393cf338b3dcdf842e71f7 100644 --- a/client_test.go +++ b/client_test.go @@ -11,14 +11,13 @@ "os" "testing" "time" - "github.com/anacrolix/torrent/data/blob" - + "github.com/anacrolix/libtorgo/bencode" + "github.com/anacrolix/utp" "github.com/bradfitz/iter" + "github.com/anacrolix/torrent/data/blob" "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/util" - "github.com/anacrolix/utp" - "github.com/anacrolix/libtorgo/bencode" ) func init() { diff --git a/cmd/torrent-verify/main.go b/cmd/torrent-verify/main.go index 4101c1d9a65fc3f1f7cc0959eeb0b579e6027391..a3d97b247d3d9eafb20e53a6a62aaba358659f85 100644 --- a/cmd/torrent-verify/main.go +++ b/cmd/torrent-verify/main.go @@ -9,9 +9,10 @@ "log" "os" "path/filepath" - "github.com/anacrolix/torrent/mmap_span" "github.com/anacrolix/libtorgo/metainfo" "launchpad.net/gommap" + + "github.com/anacrolix/torrent/mmap_span" ) var ( diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go index 0e0295ba939fe1d85d48fe36760914384aeafffc..6062d16904c4c5ad9a0c39cfbf34a4b6983ddcd3 100644 --- a/cmd/torrent/main.go +++ b/cmd/torrent/main.go @@ -10,13 +10,10 @@ "os" "strings" "time" + _ "github.com/anacrolix/envpprof" + "github.com/anacrolix/libtorgo/metainfo" "github.com/dustin/go-humanize" - "github.com/jessevdk/go-flags" - - _ "github.com/anacrolix/envpprof" - - "github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/torrent" ) diff --git a/cmd/torrentfs/main.go b/cmd/torrentfs/main.go index 58cc8fd281596efe51f0ba40060f18ad9f6f1a22..a7e786ae3fa2a7327f5ec55dba66466381cb8afd 100644 --- a/cmd/torrentfs/main.go +++ b/cmd/torrentfs/main.go @@ -13,14 +13,13 @@ "path/filepath" "syscall" "time" + "bazil.org/fuse" + fusefs "bazil.org/fuse/fs" _ "github.com/anacrolix/envpprof" - "github.com/anacrolix/torrent/util/dirwatch" - - "bazil.org/fuse" - fusefs "bazil.org/fuse/fs" "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/fs" + "github.com/anacrolix/torrent/util/dirwatch" ) var ( diff --git a/connection.go b/connection.go index aecc61f2733322d722a8bffd91d97eb8cda4cccf..2469894d9e90de5da5716c21941e31f7a62dea1a 100644 --- a/connection.go +++ b/connection.go @@ -12,6 +12,8 @@ "net" "sync" "time" + "github.com/anacrolix/libtorgo/bencode" + "github.com/anacrolix/torrent/internal/pieceordering" pp "github.com/anacrolix/torrent/peer_protocol" ) diff --git a/connection_test.go b/connection_test.go index d55186ad29cc02bcfd32df34ae161496cf24702b..d93b7d05e2a627ed188ebdf18efdaf357e2df062 100644 --- a/connection_test.go +++ b/connection_test.go @@ -4,12 +4,10 @@ import ( "testing" "time" - . "gopkg.in/check.v1" - "github.com/bradfitz/iter" + . "gopkg.in/check.v1" "github.com/anacrolix/torrent/internal/pieceordering" - "github.com/anacrolix/torrent/peer_protocol" ) diff --git a/data/blob/store.go b/data/blob/store.go index 874aa7196d07c6788752e7a01d41f8b8718d2881..ddfcd599230206f857b64102eda6945553ef8b50 100644 --- a/data/blob/store.go +++ b/data/blob/store.go @@ -12,8 +12,9 @@ "path/filepath" "sort" "time" + "github.com/anacrolix/libtorgo/metainfo" + dataPkg "github.com/anacrolix/torrent/data" - "github.com/anacrolix/libtorgo/metainfo" ) const ( diff --git a/data/mmap/mmap.go b/data/mmap/mmap.go index d071bade9e3803d8372e27390a7dbf3cb172b136..d222366289c9ae3fa4b7141db033d919c976880c 100644 --- a/data/mmap/mmap.go +++ b/data/mmap/mmap.go @@ -5,9 +5,10 @@ "fmt" "os" "path/filepath" - "github.com/anacrolix/torrent/mmap_span" "github.com/anacrolix/libtorgo/metainfo" "launchpad.net/gommap" + + "github.com/anacrolix/torrent/mmap_span" ) func TorrentData(md *metainfo.Info, location string) (mms *mmap_span.MMapSpan, err error) { diff --git a/dht/dht.go b/dht/dht.go index d2f148799f944262600c5792db103b11a6ceaa16..5f70993438ca782b2e0cf7f19e5bca3d66cb7343 100644 --- a/dht/dht.go +++ b/dht/dht.go @@ -14,11 +14,12 @@ "net" "os" "time" + "github.com/anacrolix/libtorgo/bencode" + "github.com/anacrolix/sync" + "github.com/anacrolix/torrent/iplist" "github.com/anacrolix/torrent/logonce" "github.com/anacrolix/torrent/util" - "github.com/anacrolix/sync" - "github.com/anacrolix/libtorgo/bencode" ) const ( diff --git a/dht/getpeers.go b/dht/getpeers.go index 326bb992d994683601738708106a21e5f1a8f16c..46ccd082691eb3f7dfb0836cb1101778d0a447e8 100644 --- a/dht/getpeers.go +++ b/dht/getpeers.go @@ -6,11 +6,11 @@ import ( "log" "time" - "github.com/anacrolix/torrent/logonce" - - "github.com/anacrolix/torrent/util" "github.com/anacrolix/sync" "github.com/willf/bloom" + + "github.com/anacrolix/torrent/logonce" + "github.com/anacrolix/torrent/util" ) type peerDiscovery struct { diff --git a/fs/torrentfs.go b/fs/torrentfs.go index abe065126b6d73c782388e3dd0e50b3fb6b22d92..270bf3e47258f32d354b019e83801fa4cfe0ebeb 100644 --- a/fs/torrentfs.go +++ b/fs/torrentfs.go @@ -9,11 +9,11 @@ "strings" "sync" "time" + "bazil.org/fuse" + fusefs "bazil.org/fuse/fs" "github.com/anacrolix/libtorgo/metainfo" "golang.org/x/net/context" - "bazil.org/fuse" - fusefs "bazil.org/fuse/fs" "github.com/anacrolix/torrent" ) diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index b5b7c6378555ba291f99b333c38462918c2ddba8..f45b7d8173052e84e0659237a2484cd1bbd89c7a 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -14,19 +14,16 @@ "strings" "testing" "time" - "github.com/anacrolix/torrent/data" - + "bazil.org/fuse" + fusefs "bazil.org/fuse/fs" + "github.com/anacrolix/libtorgo/metainfo" "golang.org/x/net/context" "github.com/anacrolix/torrent" + "github.com/anacrolix/torrent/data" "github.com/anacrolix/torrent/data/mmap" "github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/util" - - "github.com/anacrolix/libtorgo/metainfo" - - "bazil.org/fuse" - fusefs "bazil.org/fuse/fs" ) func TestTCPAddrString(t *testing.T) { diff --git a/mse/mse.go b/mse/mse.go index 17cd52f1c480e78df02a41e99c54f481248dfe34..9995301f929a7755c1040cd5f6e4921ce3bc351b 100644 --- a/mse/mse.go +++ b/mse/mse.go @@ -17,9 +17,9 @@ "math/big" "strconv" "sync" - "github.com/anacrolix/torrent/util" - "github.com/bradfitz/iter" + + "github.com/anacrolix/torrent/util" ) const ( diff --git a/mse/mse_test.go b/mse/mse_test.go index bc14c168147c90c7e2c3f8b7dc7bee1c6819f465..e363e332cbdd0a1c660342856ad9a1bb39e8694a 100644 --- a/mse/mse_test.go +++ b/mse/mse_test.go @@ -7,10 +7,9 @@ "io" "io/ioutil" "net" "sync" + "testing" "github.com/bradfitz/iter" - - "testing" ) func TestReadUntil(t *testing.T) { diff --git a/torrent.go b/torrent.go index 056ad80fdb1e09fa983835f8dbb42890545a872a..7b9fff057d5d55974d1f533d31a19c0b6db59970 100644 --- a/torrent.go +++ b/torrent.go @@ -12,10 +12,10 @@ "sort" "sync" "time" + "github.com/anacrolix/libtorgo/bencode" + "github.com/anacrolix/libtorgo/metainfo" "github.com/bradfitz/iter" - "github.com/anacrolix/libtorgo/bencode" - "github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/torrent/data" pp "github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/tracker" diff --git a/util/dirwatch/dirwatch.go b/util/dirwatch/dirwatch.go index 220bb1b5be2b8c952247eb75d3ef0c11049cce33..9669e8343c98ff4aab78ac6c579a70916caef695 100644 --- a/util/dirwatch/dirwatch.go +++ b/util/dirwatch/dirwatch.go @@ -9,10 +9,11 @@ "os" "path/filepath" "strings" + "github.com/anacrolix/libtorgo/metainfo" + "github.com/go-fsnotify/fsnotify" + "github.com/anacrolix/torrent" "github.com/anacrolix/torrent/util" - "github.com/anacrolix/libtorgo/metainfo" - "github.com/go-fsnotify/fsnotify" ) type Change uint