github.com/kevinklinger/open_terraform@v1.3.6/noninternal/moduletest/status_string.go (about)

     1  // Code generated by "stringer -type=Status assertion.go"; DO NOT EDIT.
     2  
     3  package moduletest
     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[Pending-63]
    12  	_ = x[Passed-80]
    13  	_ = x[Failed-70]
    14  	_ = x[Error-69]
    15  }
    16  
    17  const (
    18  	_Status_name_0 = "Pending"
    19  	_Status_name_1 = "ErrorFailed"
    20  	_Status_name_2 = "Passed"
    21  )
    22  
    23  var (
    24  	_Status_index_1 = [...]uint8{0, 5, 11}
    25  )
    26  
    27  func (i Status) String() string {
    28  	switch {
    29  	case i == 63:
    30  		return _Status_name_0
    31  	case 69 <= i && i <= 70:
    32  		i -= 69
    33  		return _Status_name_1[_Status_index_1[i]:_Status_index_1[i+1]]
    34  	case i == 80:
    35  		return _Status_name_2
    36  	default:
    37  		return "Status(" + strconv.FormatInt(int64(i), 10) + ")"
    38  	}
    39  }