github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/pkg/model/shard_state_string.go (about)

     1  // Code generated by "stringer -type=ShardStateType --trimprefix=ShardState --output shard_state_string.go"; DO NOT EDIT.
     2  
     3  package model
     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[ShardStateNew-0]
    12  	_ = x[ShardStateInProgress-1]
    13  	_ = x[ShardStateCancelled-2]
    14  	_ = x[ShardStateError-3]
    15  	_ = x[ShardStateCompleted-4]
    16  }
    17  
    18  const _ShardStateType_name = "NewInProgressCancelledErrorCompleted"
    19  
    20  var _ShardStateType_index = [...]uint8{0, 3, 13, 22, 27, 36}
    21  
    22  func (i ShardStateType) String() string {
    23  	if i < 0 || i >= ShardStateType(len(_ShardStateType_index)-1) {
    24  		return "ShardStateType(" + strconv.FormatInt(int64(i), 10) + ")"
    25  	}
    26  	return _ShardStateType_name[_ShardStateType_index[i]:_ShardStateType_index[i+1]]
    27  }