aboutsummaryrefslogtreecommitdiff
path: root/go/topology
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2013-09-01 23:58:21 -0700
committerChris Lu <chris.lu@gmail.com>2013-09-01 23:58:21 -0700
commit82b74c7940d958c4244cbc67d495b8156a17d2b3 (patch)
tree69c0fcee0f49e027a1f2bc0c9d012b2e4328475a /go/topology
parent2e70cc8be77d0047139ea56864df74477387f2f3 (diff)
downloadseaweedfs-82b74c7940d958c4244cbc67d495b8156a17d2b3.tar.xz
seaweedfs-82b74c7940d958c4244cbc67d495b8156a17d2b3.zip
issue 43 "go fmt" chagnes from "Ryan S. Brown" <sb@ryansb.com>
some basic changes to parse upload url
Diffstat (limited to 'go/topology')
-rw-r--r--go/topology/node.go2
-rw-r--r--go/topology/node_list.go2
-rw-r--r--go/topology/node_list_test.go30
-rw-r--r--go/topology/topology.go2
-rw-r--r--go/topology/topology_compact.go2
-rw-r--r--go/topology/topology_event_handling.go2
6 files changed, 20 insertions, 20 deletions
diff --git a/go/topology/node.go b/go/topology/node.go
index c8ff55f07..cfd6f6489 100644
--- a/go/topology/node.go
+++ b/go/topology/node.go
@@ -1,8 +1,8 @@
package topology
import (
- "code.google.com/p/weed-fs/go/storage"
"code.google.com/p/weed-fs/go/glog"
+ "code.google.com/p/weed-fs/go/storage"
)
type NodeId string
diff --git a/go/topology/node_list.go b/go/topology/node_list.go
index db7685d82..bed151b54 100644
--- a/go/topology/node_list.go
+++ b/go/topology/node_list.go
@@ -1,8 +1,8 @@
package topology
import (
- "code.google.com/p/weed-fs/go/storage"
"code.google.com/p/weed-fs/go/glog"
+ "code.google.com/p/weed-fs/go/storage"
"math/rand"
)
diff --git a/go/topology/node_list_test.go b/go/topology/node_list_test.go
index 0037cbaa9..c7b165ea6 100644
--- a/go/topology/node_list_test.go
+++ b/go/topology/node_list_test.go
@@ -25,21 +25,21 @@ func TestXYZ(t *testing.T) {
t.Error("need to randomly pick 1 node")
}
- picked, ret = nl.RandomlyPickN(1, 0, "dc1")
- if !ret || len(picked) != 1 {
- t.Error("need to randomly pick 1 node")
- }
- if picked[0].Id() != "dc1" {
- t.Error("need to randomly pick 1 dc1 node")
- }
-
- picked, ret = nl.RandomlyPickN(2, 0, "dc1")
- if !ret || len(picked) != 2 {
- t.Error("need to randomly pick 1 node")
- }
- if picked[0].Id() != "dc1" {
- t.Error("need to randomly pick 2 with one dc1 node")
- }
+ picked, ret = nl.RandomlyPickN(1, 0, "dc1")
+ if !ret || len(picked) != 1 {
+ t.Error("need to randomly pick 1 node")
+ }
+ if picked[0].Id() != "dc1" {
+ t.Error("need to randomly pick 1 dc1 node")
+ }
+
+ picked, ret = nl.RandomlyPickN(2, 0, "dc1")
+ if !ret || len(picked) != 2 {
+ t.Error("need to randomly pick 1 node")
+ }
+ if picked[0].Id() != "dc1" {
+ t.Error("need to randomly pick 2 with one dc1 node")
+ }
picked, ret = nl.RandomlyPickN(4, 0, "")
if !ret || len(picked) != 4 {
diff --git a/go/topology/topology.go b/go/topology/topology.go
index f70c53ae6..d0e9fb42b 100644
--- a/go/topology/topology.go
+++ b/go/topology/topology.go
@@ -1,11 +1,11 @@
package topology
import (
+ "code.google.com/p/weed-fs/go/glog"
"code.google.com/p/weed-fs/go/sequence"
"code.google.com/p/weed-fs/go/storage"
"errors"
"io/ioutil"
- "code.google.com/p/weed-fs/go/glog"
"math/rand"
)
diff --git a/go/topology/topology_compact.go b/go/topology/topology_compact.go
index 45ddda174..6394c59c6 100644
--- a/go/topology/topology_compact.go
+++ b/go/topology/topology_compact.go
@@ -1,11 +1,11 @@
package topology
import (
+ "code.google.com/p/weed-fs/go/glog"
"code.google.com/p/weed-fs/go/storage"
"code.google.com/p/weed-fs/go/util"
"encoding/json"
"errors"
- "code.google.com/p/weed-fs/go/glog"
"net/url"
"time"
)
diff --git a/go/topology/topology_event_handling.go b/go/topology/topology_event_handling.go
index c780e2beb..f3b09c649 100644
--- a/go/topology/topology_event_handling.go
+++ b/go/topology/topology_event_handling.go
@@ -1,8 +1,8 @@
package topology
import (
- "code.google.com/p/weed-fs/go/storage"
"code.google.com/p/weed-fs/go/glog"
+ "code.google.com/p/weed-fs/go/storage"
"math/rand"
"time"
)