Commit 478d3251 authored by Jakub Sztandera's avatar Jakub Sztandera

Remove errors pointed out by govet

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protonmail.ch>
parent c2012aa8
...@@ -64,8 +64,6 @@ func (dht *IpfsDHT) handleNewMessage(s inet.Stream) { ...@@ -64,8 +64,6 @@ func (dht *IpfsDHT) handleNewMessage(s inet.Stream) {
return return
} }
} }
return
} }
// sendRequest sends out a request, but also makes sure to // sendRequest sends out a request, but also makes sure to
......
...@@ -214,7 +214,7 @@ func TestProvides(t *testing.T) { ...@@ -214,7 +214,7 @@ func TestProvides(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
if !bytes.Equal(bits.GetValue(), v) { if !bytes.Equal(bits.GetValue(), v) {
t.Fatal("didn't store the right bits (%s, %s)", k, v) t.Fatalf("didn't store the right bits (%s, %s)", k, v)
} }
} }
...@@ -289,7 +289,7 @@ func waitForWellFormedTables(t *testing.T, dhts []*IpfsDHT, minPeers, avgPeers i ...@@ -289,7 +289,7 @@ func waitForWellFormedTables(t *testing.T, dhts []*IpfsDHT, minPeers, avgPeers i
func printRoutingTables(dhts []*IpfsDHT) { func printRoutingTables(dhts []*IpfsDHT) {
// the routing tables should be full now. let's inspect them. // the routing tables should be full now. let's inspect them.
fmt.Println("checking routing table of %d", len(dhts)) fmt.Printf("checking routing table of %d\n", len(dhts))
for _, dht := range dhts { for _, dht := range dhts {
fmt.Printf("checking routing table of %s\n", dht.self) fmt.Printf("checking routing table of %s\n", dht.self)
dht.routingTable.Print() dht.routingTable.Print()
...@@ -487,7 +487,7 @@ func TestProvidesMany(t *testing.T) { ...@@ -487,7 +487,7 @@ func TestProvidesMany(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
if !bytes.Equal(bits.GetValue(), v) { if !bytes.Equal(bits.GetValue(), v) {
t.Fatal("didn't store the right bits (%s, %s)", k, v) t.Fatalf("didn't store the right bits (%s, %s)", k, v)
} }
t.Logf("announcing provider for %s", k) t.Logf("announcing provider for %s", k)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment