github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/vendor_skip/golang.org/x/text/internal/number/roundingmode_string.go (about)

     1  // Code generated by "stringer -type RoundingMode"; DO NOT EDIT.
     2  
     3  package number
     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[ToNearestEven-0]
    12  	_ = x[ToNearestZero-1]
    13  	_ = x[ToNearestAway-2]
    14  	_ = x[ToPositiveInf-3]
    15  	_ = x[ToNegativeInf-4]
    16  	_ = x[ToZero-5]
    17  	_ = x[AwayFromZero-6]
    18  	_ = x[numModes-7]
    19  }
    20  
    21  const _RoundingMode_name = "ToNearestEvenToNearestZeroToNearestAwayToPositiveInfToNegativeInfToZeroAwayFromZeronumModes"
    22  
    23  var _RoundingMode_index = [...]uint8{0, 13, 26, 39, 52, 65, 71, 83, 91}
    24  
    25  func (i RoundingMode) String() string {
    26  	if i >= RoundingMode(len(_RoundingMode_index)-1) {
    27  		return "RoundingMode(" + strconv.FormatInt(int64(i), 10) + ")"
    28  	}
    29  	return _RoundingMode_name[_RoundingMode_index[i]:_RoundingMode_index[i+1]]
    30  }