go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/milo/internal/model/milostatus/status_string.go (about)

     1  // Code generated by "stringer -type=Status,BotStatus"; DO NOT EDIT.
     2  
     3  package milostatus
     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[NotRun-0]
    12  	_ = x[Running-1]
    13  	_ = x[Success-2]
    14  	_ = x[Failure-3]
    15  	_ = x[Warning-4]
    16  	_ = x[InfraFailure-5]
    17  	_ = x[Exception-6]
    18  	_ = x[Expired-7]
    19  	_ = x[Canceled-8]
    20  }
    21  
    22  const _Status_name = "NotRunRunningSuccessFailureWarningInfraFailureExceptionExpiredCanceled"
    23  
    24  var _Status_index = [...]uint8{0, 6, 13, 20, 27, 34, 46, 55, 62, 70}
    25  
    26  func (i Status) String() string {
    27  	if i < 0 || i >= Status(len(_Status_index)-1) {
    28  		return "Status(" + strconv.FormatInt(int64(i), 10) + ")"
    29  	}
    30  	return _Status_name[_Status_index[i]:_Status_index[i+1]]
    31  }
    32  func _() {
    33  	// An "invalid array index" compiler error signifies that the constant values have changed.
    34  	// Re-run the stringer command to generate them again.
    35  	var x [1]struct{}
    36  	_ = x[Idle-0]
    37  	_ = x[Busy-1]
    38  	_ = x[Offline-2]
    39  	_ = x[Quarantined-3]
    40  }
    41  
    42  const _BotStatus_name = "IdleBusyOfflineQuarantined"
    43  
    44  var _BotStatus_index = [...]uint8{0, 4, 8, 15, 26}
    45  
    46  func (i BotStatus) String() string {
    47  	if i < 0 || i >= BotStatus(len(_BotStatus_index)-1) {
    48  		return "BotStatus(" + strconv.FormatInt(int64(i), 10) + ")"
    49  	}
    50  	return _BotStatus_name[_BotStatus_index[i]:_BotStatus_index[i+1]]
    51  }