gorond ./...

This commit is contained in:
Matt Joiner 2022-11-15 23:22:10 +11:00
parent 5501f994ca
commit 3e0f34934d
No known key found for this signature in database
GPG Key ID: 6B990B8185E7F782
44 changed files with 81 additions and 52 deletions

View File

@ -5,9 +5,10 @@ import (
"log"
"sync"
"github.com/elliotchance/orderedmap"
"github.com/anacrolix/torrent"
pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/elliotchance/orderedmap"
)
type peerData struct {

View File

@ -19,12 +19,6 @@ import (
"strings"
"time"
"github.com/davecgh/go-spew/spew"
"github.com/dustin/go-humanize"
gbtree "github.com/google/btree"
"github.com/pion/datachannel"
"golang.org/x/time/rate"
"github.com/anacrolix/chansync"
"github.com/anacrolix/chansync/events"
"github.com/anacrolix/dht/v2"
@ -37,6 +31,11 @@ import (
"github.com/anacrolix/missinggo/v2/bitmap"
"github.com/anacrolix/missinggo/v2/pproffd"
"github.com/anacrolix/sync"
"github.com/davecgh/go-spew/spew"
"github.com/dustin/go-humanize"
gbtree "github.com/google/btree"
"github.com/pion/datachannel"
"golang.org/x/time/rate"
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/internal/limiter"

View File

@ -1,11 +1,13 @@
package main
import (
"os"
"github.com/anacrolix/bargle"
"github.com/anacrolix/tagflag"
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/metainfo"
"os"
)
var builtinAnnounceList = [][]string{

View File

@ -16,14 +16,15 @@ import (
"github.com/anacrolix/log"
"github.com/anacrolix/tagflag"
"github.com/davecgh/go-spew/spew"
"github.com/dustin/go-humanize"
"golang.org/x/time/rate"
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/iplist"
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/storage"
"github.com/davecgh/go-spew/spew"
"github.com/dustin/go-humanize"
"golang.org/x/time/rate"
)
func torrentBar(t *torrent.Torrent, pieceStates bool) {

View File

@ -11,6 +11,10 @@ import (
"os"
"time"
"github.com/anacrolix/bargle"
"github.com/anacrolix/envpprof"
"github.com/anacrolix/log"
xprometheus "github.com/anacrolix/missinggo/v2/prometheus"
"github.com/davecgh/go-spew/spew"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
@ -18,11 +22,6 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/sdk/trace"
"github.com/anacrolix/bargle"
"github.com/anacrolix/envpprof"
"github.com/anacrolix/log"
xprometheus "github.com/anacrolix/missinggo/v2/prometheus"
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/version"
)

View File

@ -4,13 +4,14 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"net/http"
"os"
"strings"
"net/http"
"github.com/anacrolix/bargle"
"github.com/anacrolix/torrent/metainfo"
"github.com/bradfitz/iter"
"github.com/anacrolix/torrent/metainfo"
)
type pprintMetainfoFlags struct {

View File

@ -5,10 +5,10 @@ import (
"fmt"
"net/url"
"github.com/anacrolix/torrent/tracker/udp"
"github.com/davecgh/go-spew/spew"
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/tracker/udp"
)
type scrapeCfg struct {

View File

@ -7,6 +7,7 @@ import (
"github.com/anacrolix/bargle"
"github.com/anacrolix/log"
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/metainfo"

View File

@ -11,12 +11,12 @@ import (
"github.com/anacrolix/dht/v2/krpc"
"github.com/anacrolix/log"
"github.com/anacrolix/missinggo/v2"
"github.com/anacrolix/torrent/version"
"golang.org/x/time/rate"
"github.com/anacrolix/torrent/iplist"
"github.com/anacrolix/torrent/mse"
"github.com/anacrolix/torrent/storage"
"github.com/anacrolix/torrent/version"
)
// Probably not safe to modify this after it's given to a Client.

View File

@ -7,6 +7,7 @@ import (
"github.com/anacrolix/fuse"
"github.com/anacrolix/fuse/fs"
"github.com/anacrolix/missinggo/v2"
"github.com/anacrolix/torrent"
)

View File

@ -6,12 +6,12 @@ import (
"github.com/RoaringBitmap/roaring"
"github.com/anacrolix/missinggo/v2"
"github.com/anacrolix/torrent/types"
"github.com/anacrolix/torrent/types/infohash"
"golang.org/x/time/rate"
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/types"
"github.com/anacrolix/torrent/types/infohash"
)
type (

View File

@ -5,8 +5,9 @@ import (
"io"
"sync"
"github.com/anacrolix/torrent/segments"
"github.com/edsrzf/mmap-go"
"github.com/anacrolix/torrent/segments"
)
type MMapSpan struct {

View File

@ -9,6 +9,7 @@ import (
"sync"
"github.com/alexflint/go-arg"
"github.com/anacrolix/torrent/mse"
)

View File

@ -2,8 +2,9 @@ package torrent
import (
"github.com/anacrolix/generics"
"github.com/anacrolix/torrent/typed-roaring"
list "github.com/bahlo/generic-list-go"
"github.com/anacrolix/torrent/typed-roaring"
)
type orderedBitmap[T typedRoaring.BitConstraint] struct {

View File

@ -2,6 +2,7 @@ package torrent
import (
"github.com/RoaringBitmap/roaring"
"github.com/anacrolix/torrent/metainfo"
)

View File

@ -2,6 +2,7 @@ package peer_protocol
import (
"github.com/anacrolix/dht/v2/krpc"
"github.com/anacrolix/torrent/bencode"
)

View File

@ -20,13 +20,14 @@ import (
"github.com/anacrolix/missinggo/iter"
"github.com/anacrolix/missinggo/v2/bitmap"
"github.com/anacrolix/multiless"
"golang.org/x/time/rate"
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/mse"
pp "github.com/anacrolix/torrent/peer_protocol"
request_strategy "github.com/anacrolix/torrent/request-strategy"
"github.com/anacrolix/torrent/typed-roaring"
"golang.org/x/time/rate"
)
type PeerSource string

1
pex.go
View File

@ -6,6 +6,7 @@ import (
"time"
"github.com/anacrolix/dht/v2/krpc"
pp "github.com/anacrolix/torrent/peer_protocol"
)

View File

@ -6,6 +6,7 @@ import (
"github.com/anacrolix/chansync"
"github.com/anacrolix/missinggo/v2/bitmap"
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/storage"

View File

@ -5,8 +5,8 @@ import (
"expvar"
"github.com/anacrolix/multiless"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/types"
)

View File

@ -11,10 +11,10 @@ import (
"github.com/anacrolix/log"
"github.com/anacrolix/multiless"
"github.com/anacrolix/torrent/typed-roaring"
"github.com/lispad/go-generics-tools/binheap"
"github.com/anacrolix/torrent/request-strategy"
"github.com/anacrolix/torrent/typed-roaring"
)
func (t *Torrent) requestStrategyPieceOrderState(i int) request_strategy.PieceRequestOrderState {

View File

@ -6,6 +6,7 @@ import (
"net/netip"
"github.com/anacrolix/generics"
"github.com/anacrolix/torrent/smartban"
)

View File

@ -8,8 +8,9 @@ import (
"github.com/anacrolix/log"
"github.com/anacrolix/missinggo/perf"
"github.com/anacrolix/missinggo/v2"
"github.com/anacrolix/torrent/dialer"
"github.com/pkg/errors"
"github.com/anacrolix/torrent/dialer"
)
type Listener interface {

View File

@ -6,6 +6,7 @@ import (
"net/http"
"github.com/anacrolix/log"
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/metainfo"
)

View File

@ -7,10 +7,10 @@ import (
"path/filepath"
"github.com/anacrolix/missinggo/v2"
"github.com/anacrolix/torrent/common"
"github.com/anacrolix/torrent/segments"
"github.com/anacrolix/torrent/common"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/segments"
)
// File-based storage for torrents, that isn't yet bound to a particular torrent.

View File

@ -13,6 +13,7 @@ import (
"crawshaw.io/sqlite"
"crawshaw.io/sqlite/sqlitex"
"github.com/anacrolix/torrent/metainfo"
)

View File

@ -6,9 +6,10 @@ import (
"sync"
"testing"
qt "github.com/frankban/quicktest"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/storage"
qt "github.com/frankban/quicktest"
)
const (

View File

@ -5,6 +5,7 @@ import (
"os"
"github.com/anacrolix/missinggo/v2"
"github.com/anacrolix/torrent/metainfo"
)

View File

@ -9,13 +9,14 @@ import (
"testing/iotest"
"github.com/anacrolix/missinggo/v2/bitmap"
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/storage"
"github.com/frankban/quicktest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/time/rate"
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/internal/testutil"
"github.com/anacrolix/torrent/storage"
)
type LeecherStorageTestCase struct {

View File

@ -5,6 +5,7 @@ import (
"time"
"github.com/anacrolix/log"
pp "github.com/anacrolix/torrent/peer_protocol"
)

View File

@ -30,8 +30,6 @@ import (
"github.com/anacrolix/missinggo/v2/pubsub"
"github.com/anacrolix/multiless"
"github.com/anacrolix/sync"
request_strategy "github.com/anacrolix/torrent/request-strategy"
typedRoaring "github.com/anacrolix/torrent/typed-roaring"
"github.com/davecgh/go-spew/spew"
"github.com/pion/datachannel"
@ -39,9 +37,11 @@ import (
"github.com/anacrolix/torrent/common"
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
request_strategy "github.com/anacrolix/torrent/request-strategy"
"github.com/anacrolix/torrent/segments"
"github.com/anacrolix/torrent/storage"
"github.com/anacrolix/torrent/tracker"
typedRoaring "github.com/anacrolix/torrent/typed-roaring"
"github.com/anacrolix/torrent/webseed"
"github.com/anacrolix/torrent/webtorrent"
)

View File

@ -6,6 +6,7 @@ import (
"net/url"
"github.com/anacrolix/log"
trHttp "github.com/anacrolix/torrent/tracker/http"
"github.com/anacrolix/torrent/tracker/udp"
)

View File

@ -14,6 +14,7 @@ import (
"strings"
"github.com/anacrolix/missinggo/httptoo"
"github.com/anacrolix/torrent/bencode"
"github.com/anacrolix/torrent/tracker/shared"
"github.com/anacrolix/torrent/tracker/udp"

View File

@ -4,6 +4,7 @@ import (
"fmt"
"github.com/anacrolix/dht/v2/krpc"
"github.com/anacrolix/torrent/bencode"
)

View File

@ -11,6 +11,7 @@ import (
"github.com/anacrolix/dht/v2/krpc"
"github.com/anacrolix/log"
trHttp "github.com/anacrolix/torrent/tracker/http"
"github.com/anacrolix/torrent/tracker/shared"
"github.com/anacrolix/torrent/tracker/udp"

View File

@ -5,7 +5,6 @@ import (
"net"
"github.com/anacrolix/log"
"github.com/anacrolix/missinggo/v2"
)

View File

@ -10,8 +10,9 @@ import (
"github.com/anacrolix/log"
"github.com/anacrolix/missinggo/v2"
"github.com/anacrolix/torrent/metainfo"
"github.com/fsnotify/fsnotify"
"github.com/anacrolix/torrent/metainfo"
)
type Change uint

View File

@ -1,16 +1,17 @@
package torrent
import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"net"
"strconv"
"time"
"github.com/anacrolix/torrent/webtorrent"
"github.com/pion/datachannel"
"github.com/pion/webrtc/v3"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"github.com/anacrolix/torrent/webtorrent"
)
const webrtcNetwork = "webrtc"

View File

@ -10,6 +10,7 @@ import (
"github.com/RoaringBitmap/roaring"
"github.com/anacrolix/log"
"github.com/anacrolix/torrent/metainfo"
pp "github.com/anacrolix/torrent/peer_protocol"
"github.com/anacrolix/torrent/webseed"

View File

@ -11,6 +11,7 @@ import (
"strings"
"github.com/RoaringBitmap/roaring"
"github.com/anacrolix/torrent/common"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/segments"

View File

@ -5,17 +5,17 @@ import (
"crypto/rand"
"encoding/json"
"fmt"
"github.com/anacrolix/generics"
"go.opentelemetry.io/otel/trace"
"sync"
"time"
"github.com/anacrolix/generics"
"github.com/anacrolix/log"
"github.com/anacrolix/torrent/tracker"
"github.com/gorilla/websocket"
"github.com/pion/datachannel"
"github.com/pion/webrtc/v3"
"go.opentelemetry.io/otel/trace"
"github.com/anacrolix/torrent/tracker"
)
type TrackerClientStats struct {

View File

@ -4,6 +4,10 @@ import (
"context"
"expvar"
"fmt"
"io"
"sync"
"time"
"github.com/anacrolix/log"
"github.com/anacrolix/missinggo/v2/pproffd"
"github.com/pion/datachannel"
@ -12,9 +16,6 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
"io"
"sync"
"time"
)
const (

View File

@ -8,12 +8,12 @@ import (
"sync"
"github.com/anacrolix/log"
"github.com/anacrolix/torrent/tracker/http"
"github.com/gorilla/websocket"
"github.com/pion/datachannel"
"github.com/anacrolix/torrent/tracker"
"github.com/anacrolix/torrent/tracker/http"
"github.com/anacrolix/torrent/webtorrent"
"github.com/pion/datachannel"
)
type websocketTrackerStatus struct {