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

     1  // Code generated by "stringer -type=Status"; DO NOT EDIT.
     2  
     3  package checks
     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[StatusUnknown-0]
    12  	_ = x[StatusPass-80]
    13  	_ = x[StatusFail-70]
    14  	_ = x[StatusError-69]
    15  }
    16  
    17  const (
    18  	_Status_name_0 = "StatusUnknown"
    19  	_Status_name_1 = "StatusErrorStatusFail"
    20  	_Status_name_2 = "StatusPass"
    21  )
    22  
    23  var (
    24  	_Status_index_1 = [...]uint8{0, 11, 21}
    25  )
    26  
    27  func (i Status) String() string {
    28  	switch {
    29  	case i == 0:
    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  }