aboutsummaryrefslogtreecommitdiff
path: root/go/topology
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2013-02-10 09:44:44 -0800
committerChris Lu <chris.lu@gmail.com>2013-02-10 09:44:44 -0800
commit79d11ac951dd0e04c52a1e1bc9925f3fef3d962b (patch)
tree97c8b6c3835d173ad0e003a0c2b4f588188b29c4 /go/topology
parentd4e5a22e5312ce2d0a2a8e25d45d27971b147252 (diff)
downloadseaweedfs-79d11ac951dd0e04c52a1e1bc9925f3fef3d962b.tar.xz
seaweedfs-79d11ac951dd0e04c52a1e1bc9925f3fef3d962b.zip
go vet
Diffstat (limited to 'go/topology')
-rw-r--r--go/topology/node_list_test.go8
-rw-r--r--go/topology/topology_compact.go2
2 files changed, 5 insertions, 5 deletions
diff --git a/go/topology/node_list_test.go b/go/topology/node_list_test.go
index 2fb4fa970..4cd2ebaa1 100644
--- a/go/topology/node_list_test.go
+++ b/go/topology/node_list_test.go
@@ -18,22 +18,22 @@ func TestXYZ(t *testing.T) {
picked, ret := nl.RandomlyPickN(1)
if !ret || len(picked) != 1 {
- t.Errorf("need to randomly pick 1 node")
+ t.Error("need to randomly pick 1 node")
}
picked, ret = nl.RandomlyPickN(4)
if !ret || len(picked) != 4 {
- t.Errorf("need to randomly pick 4 nodes")
+ t.Error("need to randomly pick 4 nodes")
}
picked, ret = nl.RandomlyPickN(5)
if !ret || len(picked) != 5 {
- t.Errorf("need to randomly pick 5 nodes")
+ t.Error("need to randomly pick 5 nodes")
}
picked, ret = nl.RandomlyPickN(6)
if ret || len(picked) != 0 {
- t.Errorf("can not randomly pick 6 nodes:", ret, picked)
+ t.Error("can not randomly pick 6 nodes:", ret, picked)
}
}
diff --git a/go/topology/topology_compact.go b/go/topology/topology_compact.go
index e25e394d4..9c9abde4f 100644
--- a/go/topology/topology_compact.go
+++ b/go/topology/topology_compact.go
@@ -41,7 +41,7 @@ func batchVacuumVolumeCompact(vl *VolumeLayout, vid storage.VolumeId, locationli
ch := make(chan bool, locationlist.Length())
for index, dn := range locationlist.list {
go func(index int, url string, vid storage.VolumeId) {
- fmt.Println(index, "Start vacuuming", vid, "on", dn.Url())
+ fmt.Println(index, "Start vacuuming", vid, "on", url)
if e := vacuumVolume_Compact(url, vid); e != nil {
fmt.Println(index, "Error when vacuuming", vid, "on", url, e)
ch <- false