decred.org/dcrwallet/v3@v3.1.0/wallet/ticketstatus_string.go (about)

     1  // Code generated by "stringer -type=TicketStatus -linecomment"; DO NOT EDIT.
     2  
     3  package wallet
     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[TicketStatusUnknown-0]
    12  	_ = x[TicketStatusUnmined-1]
    13  	_ = x[TicketStatusImmature-2]
    14  	_ = x[TicketStatusLive-3]
    15  	_ = x[TicketStatusVoted-4]
    16  	_ = x[TicketStatusMissed-5]
    17  	_ = x[TicketStatusExpired-6]
    18  	_ = x[TicketStatusUnspent-7]
    19  	_ = x[TicketStatusRevoked-8]
    20  }
    21  
    22  const _TicketStatus_name = "unknownunminedimmaturelivevotedmissedexpiredunspentrevoked"
    23  
    24  var _TicketStatus_index = [...]uint8{0, 7, 14, 22, 26, 31, 37, 44, 51, 58}
    25  
    26  func (i TicketStatus) String() string {
    27  	if i >= TicketStatus(len(_TicketStatus_index)-1) {
    28  		return "TicketStatus(" + strconv.FormatInt(int64(i), 10) + ")"
    29  	}
    30  	return _TicketStatus_name[_TicketStatus_index[i]:_TicketStatus_index[i+1]]
    31  }