...

Source file src/go.etcd.io/etcd/raft/v3/quorum/voteresult_string.go

Documentation: go.etcd.io/etcd/raft/v3/quorum

     1  // Code generated by "stringer -type=VoteResult"; DO NOT EDIT.
     2  
     3  package quorum
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[VotePending-1]
    12  	_ = x[VoteLost-2]
    13  	_ = x[VoteWon-3]
    14  }
    15  
    16  const _VoteResult_name = "VotePendingVoteLostVoteWon"
    17  
    18  var _VoteResult_index = [...]uint8{0, 11, 19, 26}
    19  
    20  func (i VoteResult) String() string {
    21  	i -= 1
    22  	if i >= VoteResult(len(_VoteResult_index)-1) {
    23  		return "VoteResult(" + strconv.FormatInt(int64(i+1), 10) + ")"
    24  	}
    25  	return _VoteResult_name[_VoteResult_index[i]:_VoteResult_index[i+1]]
    26  }
    27  

View as plain text