raft: fix issues reported by golint

This commit is contained in:
Xiang Li
2016-04-07 22:14:56 -07:00
parent 71a492e59e
commit 1b41ee9c99
2 changed files with 7 additions and 3 deletions

View File

@ -29,8 +29,6 @@ import (
const None uint64 = 0
const noLimit = math.MaxUint64
var ErrSnapshotTemporarilyUnavailable = errors.New("snapshot is temporarily unavailable")
// Possible values for StateType.
const (
StateFollower StateType = iota
@ -229,7 +227,7 @@ func newRaft(c *Config) *raft {
}
r.becomeFollower(r.Term, None)
nodesStrs := make([]string, 0)
var nodesStrs []string
for _, n := range r.nodes() {
nodesStrs = append(nodesStrs, fmt.Sprintf("%x", n))
}