mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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:
parent
36558b1924
commit
1083ce8f73
24
raft/raft.go
24
raft/raft.go
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user