Run go vet on everything

This commit is contained in:
Matt Joiner 2014-07-10 02:59:37 +10:00
parent a88f856468
commit e947ce2ee4
4 changed files with 3 additions and 4 deletions

View File

@ -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)

View File

@ -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,

View File

@ -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 {

View File

@ -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) {