raft: remove misleading labels in array definition

Since these are arrays instead of maps, the "keys" here are actually
(useless) goto labels. What really matters is that the ordering is
the same between the constant declarations and the array.
This commit is contained in:
Ben Darnell 2014-10-07 18:34:32 -04:00
parent 36558b1924
commit 1083ce8f73

View File

@ -26,15 +26,15 @@ const (
)
var mtmap = [...]string{
msgHup: "msgHup",
msgBeat: "msgBeat",
msgProp: "msgProp",
msgApp: "msgApp",
msgAppResp: "msgAppResp",
msgVote: "msgVote",
msgVoteResp: "msgVoteResp",
msgSnap: "msgSnap",
msgDenied: "msgDenied",
"msgHup",
"msgBeat",
"msgProp",
"msgApp",
"msgAppResp",
"msgVote",
"msgVoteResp",
"msgSnap",
"msgDenied",
}
func (mt messageType) String() string {
@ -54,9 +54,9 @@ const (
type StateType int64
var stmap = [...]string{
StateFollower: "StateFollower",
StateCandidate: "StateCandidate",
StateLeader: "StateLeader",
"StateFollower",
"StateCandidate",
"StateLeader",
}
func (st StateType) String() string {