Browse Source

raft: go fmt

Blake Mizerany 11 years ago
parent
commit
ad307c6965
2 changed files with 4 additions and 4 deletions
  1. 3 3
      raft/raft_test.go
  2. 1 1
      raft/snapshot.go

+ 3 - 3
raft/raft_test.go

@@ -792,9 +792,9 @@ func TestRecvMsgBeat(t *testing.T) {
 
 func TestRestore(t *testing.T) {
 	s := Snapshot{
-		Index:     defaultCompactThreshold + 1,
-		Term:      defaultCompactThreshold + 1,
-		Nodes:     []int64{0, 1, 2},
+		Index: defaultCompactThreshold + 1,
+		Term:  defaultCompactThreshold + 1,
+		Nodes: []int64{0, 1, 2},
 	}
 
 	sm := newRaft(0, []int64{0, 1})

+ 1 - 1
raft/snapshot.go

@@ -3,7 +3,7 @@ package raft
 var emptySnapshot = Snapshot{}
 
 type Snapshot struct {
-	Data      []byte
+	Data []byte
 	// the configuration
 	Nodes []int64
 	// the index at which the snapshot was taken.