aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-08-12 14:27:14 -0700
committerChris Lu <chris.lu@gmail.com>2018-08-12 14:27:14 -0700
commit75d63db60d1677f2e3350c3ee2b9dbecf931ec1a (patch)
tree939d170c6c2e076395b219fcbd91eac0a743c71e /weed/command
parenteca4b928d2b14fa940233eba3458df52077a9ede (diff)
downloadseaweedfs-75d63db60d1677f2e3350c3ee2b9dbecf931ec1a.tar.xz
seaweedfs-75d63db60d1677f2e3350c3ee2b9dbecf931ec1a.zip
randomize raft server startup
also some go fmt
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/benchmark.go2
-rw-r--r--weed/command/master.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/weed/command/benchmark.go b/weed/command/benchmark.go
index 4ba00dc98..8b65c8663 100644
--- a/weed/command/benchmark.go
+++ b/weed/command/benchmark.go
@@ -2,6 +2,7 @@ package command
import (
"bufio"
+ "context"
"fmt"
"io"
"math"
@@ -19,7 +20,6 @@ import (
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/util"
"github.com/chrislusf/seaweedfs/weed/wdclient"
- "context"
)
type BenchmarkOptions struct {
diff --git a/weed/command/master.go b/weed/command/master.go
index ac5902b60..34f467bd2 100644
--- a/weed/command/master.go
+++ b/weed/command/master.go
@@ -132,7 +132,7 @@ func checkPeers(masterIp string, masterPort int, peers string) (masterAddress st
if !hasSelf {
peerCount += 1
}
- if peerCount %2 == 0 {
+ if peerCount%2 == 0 {
glog.Fatalf("Only odd number of masters are supported!")
}
return