github.com/opentofu/opentofu@v1.7.1/internal/plans/mode_string.go (about)

     1  // Code generated by "stringer -type Mode"; DO NOT EDIT.
     2  
     3  package plans
     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[NormalMode-0]
    12  	_ = x[DestroyMode-68]
    13  	_ = x[RefreshOnlyMode-82]
    14  }
    15  
    16  const (
    17  	_Mode_name_0 = "NormalMode"
    18  	_Mode_name_1 = "DestroyMode"
    19  	_Mode_name_2 = "RefreshOnlyMode"
    20  )
    21  
    22  func (i Mode) String() string {
    23  	switch {
    24  	case i == 0:
    25  		return _Mode_name_0
    26  	case i == 68:
    27  		return _Mode_name_1
    28  	case i == 82:
    29  		return _Mode_name_2
    30  	default:
    31  		return "Mode(" + strconv.FormatInt(int64(i), 10) + ")"
    32  	}
    33  }