github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/states/eachmode_string.go (about)

     1  // Code generated by "stringer -type EachMode"; DO NOT EDIT.
     2  
     3  package states
     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[NoEach-0]
    12  	_ = x[EachList-76]
    13  	_ = x[EachMap-77]
    14  }
    15  
    16  const (
    17  	_EachMode_name_0 = "NoEach"
    18  	_EachMode_name_1 = "EachListEachMap"
    19  )
    20  
    21  var (
    22  	_EachMode_index_1 = [...]uint8{0, 8, 15}
    23  )
    24  
    25  func (i EachMode) String() string {
    26  	switch {
    27  	case i == 0:
    28  		return _EachMode_name_0
    29  	case 76 <= i && i <= 77:
    30  		i -= 76
    31  		return _EachMode_name_1[_EachMode_index_1[i]:_EachMode_index_1[i+1]]
    32  	default:
    33  		return "EachMode(" + strconv.FormatInt(int64(i), 10) + ")"
    34  	}
    35  }