2
0
mirror of synced 2025-02-23 22:28:11 +00:00

Use rogpeppe's sortimports to fix this goimports ordering madness

This commit is contained in:
Matt Joiner 2015-03-26 17:18:08 +11:00
parent 604e61497e
commit 3aa78763aa
17 changed files with 41 additions and 46 deletions

View File

@ -38,24 +38,23 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/bradfitz/iter"
"github.com/anacrolix/torrent/mse"
"github.com/anacrolix/libtorgo/bencode" "github.com/anacrolix/libtorgo/bencode"
"github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/libtorgo/metainfo"
"github.com/anacrolix/sync" "github.com/anacrolix/sync"
"github.com/anacrolix/utp"
"github.com/bradfitz/iter"
"github.com/anacrolix/torrent/data" "github.com/anacrolix/torrent/data"
filePkg "github.com/anacrolix/torrent/data/file" filePkg "github.com/anacrolix/torrent/data/file"
"github.com/anacrolix/torrent/dht" "github.com/anacrolix/torrent/dht"
"github.com/anacrolix/torrent/internal/pieceordering" "github.com/anacrolix/torrent/internal/pieceordering"
"github.com/anacrolix/torrent/iplist" "github.com/anacrolix/torrent/iplist"
"github.com/anacrolix/torrent/logonce" "github.com/anacrolix/torrent/logonce"
"github.com/anacrolix/torrent/mse"
pp "github.com/anacrolix/torrent/peer_protocol" pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/tracker" "github.com/anacrolix/torrent/tracker"
_ "github.com/anacrolix/torrent/tracker/udp" _ "github.com/anacrolix/torrent/tracker/udp"
. "github.com/anacrolix/torrent/util" . "github.com/anacrolix/torrent/util"
"github.com/anacrolix/utp"
) )
var ( var (

View File

@ -11,14 +11,13 @@ import (
"testing" "testing"
"time" "time"
"github.com/anacrolix/torrent/data/blob" "github.com/anacrolix/libtorgo/bencode"
"github.com/anacrolix/utp"
"github.com/bradfitz/iter" "github.com/bradfitz/iter"
"github.com/anacrolix/torrent/data/blob"
"github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/util" "github.com/anacrolix/torrent/util"
"github.com/anacrolix/utp"
"github.com/anacrolix/libtorgo/bencode"
) )
func init() { func init() {

View File

@ -9,9 +9,10 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/anacrolix/torrent/mmap_span"
"github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/libtorgo/metainfo"
"launchpad.net/gommap" "launchpad.net/gommap"
"github.com/anacrolix/torrent/mmap_span"
) )
var ( var (

View File

@ -10,13 +10,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/dustin/go-humanize"
"github.com/jessevdk/go-flags"
_ "github.com/anacrolix/envpprof" _ "github.com/anacrolix/envpprof"
"github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/libtorgo/metainfo"
"github.com/dustin/go-humanize"
"github.com/jessevdk/go-flags"
"github.com/anacrolix/torrent" "github.com/anacrolix/torrent"
) )

View File

@ -13,14 +13,13 @@ import (
"syscall" "syscall"
"time" "time"
_ "github.com/anacrolix/envpprof"
"github.com/anacrolix/torrent/util/dirwatch"
"bazil.org/fuse" "bazil.org/fuse"
fusefs "bazil.org/fuse/fs" fusefs "bazil.org/fuse/fs"
_ "github.com/anacrolix/envpprof"
"github.com/anacrolix/torrent" "github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/fs" "github.com/anacrolix/torrent/fs"
"github.com/anacrolix/torrent/util/dirwatch"
) )
var ( var (

View File

@ -12,6 +12,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/anacrolix/libtorgo/bencode"
"github.com/anacrolix/torrent/internal/pieceordering" "github.com/anacrolix/torrent/internal/pieceordering"
pp "github.com/anacrolix/torrent/peer_protocol" pp "github.com/anacrolix/torrent/peer_protocol"
) )

View File

@ -4,12 +4,10 @@ import (
"testing" "testing"
"time" "time"
"github.com/bradfitz/iter"
. "gopkg.in/check.v1" . "gopkg.in/check.v1"
"github.com/bradfitz/iter"
"github.com/anacrolix/torrent/internal/pieceordering" "github.com/anacrolix/torrent/internal/pieceordering"
"github.com/anacrolix/torrent/peer_protocol" "github.com/anacrolix/torrent/peer_protocol"
) )

View File

@ -12,8 +12,9 @@ import (
"sort" "sort"
"time" "time"
dataPkg "github.com/anacrolix/torrent/data"
"github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/libtorgo/metainfo"
dataPkg "github.com/anacrolix/torrent/data"
) )
const ( const (

View File

@ -5,9 +5,10 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/anacrolix/torrent/mmap_span"
"github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/libtorgo/metainfo"
"launchpad.net/gommap" "launchpad.net/gommap"
"github.com/anacrolix/torrent/mmap_span"
) )
func TorrentData(md *metainfo.Info, location string) (mms *mmap_span.MMapSpan, err error) { func TorrentData(md *metainfo.Info, location string) (mms *mmap_span.MMapSpan, err error) {

View File

@ -14,11 +14,12 @@ import (
"os" "os"
"time" "time"
"github.com/anacrolix/libtorgo/bencode"
"github.com/anacrolix/sync"
"github.com/anacrolix/torrent/iplist" "github.com/anacrolix/torrent/iplist"
"github.com/anacrolix/torrent/logonce" "github.com/anacrolix/torrent/logonce"
"github.com/anacrolix/torrent/util" "github.com/anacrolix/torrent/util"
"github.com/anacrolix/sync"
"github.com/anacrolix/libtorgo/bencode"
) )
const ( const (

View File

@ -6,11 +6,11 @@ import (
"log" "log"
"time" "time"
"github.com/anacrolix/torrent/logonce"
"github.com/anacrolix/torrent/util"
"github.com/anacrolix/sync" "github.com/anacrolix/sync"
"github.com/willf/bloom" "github.com/willf/bloom"
"github.com/anacrolix/torrent/logonce"
"github.com/anacrolix/torrent/util"
) )
type peerDiscovery struct { type peerDiscovery struct {

View File

@ -9,11 +9,11 @@ import (
"sync" "sync"
"time" "time"
"bazil.org/fuse"
fusefs "bazil.org/fuse/fs"
"github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/libtorgo/metainfo"
"golang.org/x/net/context" "golang.org/x/net/context"
"bazil.org/fuse"
fusefs "bazil.org/fuse/fs"
"github.com/anacrolix/torrent" "github.com/anacrolix/torrent"
) )

View File

@ -14,19 +14,16 @@ import (
"testing" "testing"
"time" "time"
"github.com/anacrolix/torrent/data" "bazil.org/fuse"
fusefs "bazil.org/fuse/fs"
"github.com/anacrolix/libtorgo/metainfo"
"golang.org/x/net/context" "golang.org/x/net/context"
"github.com/anacrolix/torrent" "github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/data"
"github.com/anacrolix/torrent/data/mmap" "github.com/anacrolix/torrent/data/mmap"
"github.com/anacrolix/torrent/internal/testutil" "github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/util" "github.com/anacrolix/torrent/util"
"github.com/anacrolix/libtorgo/metainfo"
"bazil.org/fuse"
fusefs "bazil.org/fuse/fs"
) )
func TestTCPAddrString(t *testing.T) { func TestTCPAddrString(t *testing.T) {

View File

@ -17,9 +17,9 @@ import (
"strconv" "strconv"
"sync" "sync"
"github.com/anacrolix/torrent/util"
"github.com/bradfitz/iter" "github.com/bradfitz/iter"
"github.com/anacrolix/torrent/util"
) )
const ( const (

View File

@ -7,10 +7,9 @@ import (
"io/ioutil" "io/ioutil"
"net" "net"
"sync" "sync"
"testing"
"github.com/bradfitz/iter" "github.com/bradfitz/iter"
"testing"
) )
func TestReadUntil(t *testing.T) { func TestReadUntil(t *testing.T) {

View File

@ -12,10 +12,10 @@ import (
"sync" "sync"
"time" "time"
"github.com/bradfitz/iter"
"github.com/anacrolix/libtorgo/bencode" "github.com/anacrolix/libtorgo/bencode"
"github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/libtorgo/metainfo"
"github.com/bradfitz/iter"
"github.com/anacrolix/torrent/data" "github.com/anacrolix/torrent/data"
pp "github.com/anacrolix/torrent/peer_protocol" pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/tracker" "github.com/anacrolix/torrent/tracker"

View File

@ -9,10 +9,11 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/util"
"github.com/anacrolix/libtorgo/metainfo" "github.com/anacrolix/libtorgo/metainfo"
"github.com/go-fsnotify/fsnotify" "github.com/go-fsnotify/fsnotify"
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/util"
) )
type Change uint type Change uint