go fmt ./...
This commit is contained in:
parent
da1221dd50
commit
fd8995dcfd
|
@ -10,10 +10,10 @@ import (
|
|||
const (
|
||||
pieceHash = crypto.SHA1
|
||||
defaultChunkSize = 0x4000 // 16KiB
|
||||
|
||||
|
||||
// Arbitrary maximum of "metadata_size" (see https://www.bittorrent.org/beps/bep_0009.html)
|
||||
// This value is 2x what libtorrent-rasterbar uses, which should be plenty
|
||||
maxMetadataSize uint32 = 8*1024*1024
|
||||
maxMetadataSize uint32 = 8 * 1024 * 1024
|
||||
)
|
||||
|
||||
// These are our extended message IDs. Peers will use these values to
|
||||
|
|
|
@ -30,15 +30,15 @@ type pieceRange struct {
|
|||
}
|
||||
|
||||
type reader struct {
|
||||
t *Torrent
|
||||
t *Torrent
|
||||
// Adjust the read/seek window to handle Readers locked to File extents and the like.
|
||||
offset, length int64
|
||||
|
||||
|
||||
// Function to dynamically calculate readahead. If nil, readahead is static.
|
||||
readaheadFunc func() int64
|
||||
|
||||
|
||||
// Required when modifying pos and readahead.
|
||||
mu sync.Locker
|
||||
mu sync.Locker
|
||||
|
||||
readahead, pos int64
|
||||
// Position that reads have continued contiguously from.
|
||||
|
@ -52,7 +52,6 @@ type reader struct {
|
|||
// after a seek or with a new reader at the starting position.
|
||||
reading bool
|
||||
responsive bool
|
||||
|
||||
}
|
||||
|
||||
var _ io.ReadSeekCloser = (*reader)(nil)
|
||||
|
|
Loading…
Reference in New Issue