mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
Fixes for go vet
This commit is contained in:
parent
0c9f1efc75
commit
12d69e25dd
@ -46,7 +46,7 @@ func TestRandomString(t *testing.T) {
|
||||
for _, l := range []int{0, 1, 2, 3, 4, 8, 42} {
|
||||
s := randomString(l)
|
||||
if len(s) != l {
|
||||
t.Errorf("Incorrect length %d != %s", len(s), l)
|
||||
t.Errorf("Incorrect length %d != %d", len(s), l)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ func TestCache(t *testing.T) {
|
||||
|
||||
res, ok := c.get("nonexistent")
|
||||
if res != false || ok != false {
|
||||
t.Error("res %v, ok %v for nonexistent item", res, ok)
|
||||
t.Errorf("res %v, ok %v for nonexistent item", res, ok)
|
||||
}
|
||||
|
||||
// Set and check some items
|
||||
|
@ -22,9 +22,9 @@ import (
|
||||
)
|
||||
|
||||
func TestDeviceActivity(t *testing.T) {
|
||||
n0 := protocol.DeviceID{1, 2, 3, 4}
|
||||
n1 := protocol.DeviceID{5, 6, 7, 8}
|
||||
n2 := protocol.DeviceID{9, 10, 11, 12}
|
||||
n0 := protocol.DeviceID([32]byte{1, 2, 3, 4})
|
||||
n1 := protocol.DeviceID([32]byte{5, 6, 7, 8})
|
||||
n2 := protocol.DeviceID([32]byte{9, 10, 11, 12})
|
||||
devices := []protocol.DeviceID{n0, n1, n2}
|
||||
na := newDeviceActivity()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user