Run go vet on everything
This commit is contained in:
parent
a88f856468
commit
e947ce2ee4
|
@ -717,7 +717,7 @@ func (me *Client) connectionLoop(t *torrent, c *connection) error {
|
|||
log.Printf("added %d peers from PEX", len(pexMsg.Added))
|
||||
}()
|
||||
default:
|
||||
err = fmt.Errorf("unexpected extended message ID: %s", msg.ExtendedID)
|
||||
err = fmt.Errorf("unexpected extended message ID: %v", msg.ExtendedID)
|
||||
}
|
||||
default:
|
||||
err = fmt.Errorf("received unknown message type: %#v", msg.Type)
|
||||
|
|
|
@ -41,7 +41,7 @@ func TestTorrentInitialState(t *testing.T) {
|
|||
}
|
||||
p := tor.Pieces[0]
|
||||
if len(p.PendingChunkSpecs) != 1 {
|
||||
t.Fatalf("should only be 1 chunk: %s", p.PendingChunkSpecs)
|
||||
t.Fatalf("should only be 1 chunk: %v", p.PendingChunkSpecs)
|
||||
}
|
||||
if _, ok := p.PendingChunkSpecs[chunkSpec{
|
||||
Length: 13,
|
||||
|
|
|
@ -23,7 +23,7 @@ func (me *nodeMaxHeap) Push(val interface{}) {
|
|||
me.IDs = append(me.IDs, val.(string))
|
||||
}
|
||||
func (me nodeMaxHeap) Swap(i, j int) {
|
||||
me.IDs[i], me.IDs[j] = me.IDs[i], me.IDs[j]
|
||||
me.IDs[i], me.IDs[j] = me.IDs[j], me.IDs[i]
|
||||
}
|
||||
|
||||
type closestNodesSelector struct {
|
||||
|
|
|
@ -124,7 +124,6 @@ func (c *client) Announce(req *tracker.AnnounceRequest) (res tracker.AnnounceRes
|
|||
Port: int(p.Port),
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *client) write(h *RequestHeader, body interface{}) (err error) {
|
||||
|
|
Loading…
Reference in New Issue