cuelang.org/go@v0.13.0/internal/core/adt/errorcode_string.go (about)

     1  // Code generated by "stringer -type=ErrorCode -linecomment"; DO NOT EDIT.
     2  
     3  package adt
     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[EvalError-0]
    12  	_ = x[UserError-1]
    13  	_ = x[StructuralCycleError-2]
    14  	_ = x[IncompleteError-3]
    15  	_ = x[CycleError-4]
    16  }
    17  
    18  const _ErrorCode_name = "evaluserstructural cycleincompletecycle"
    19  
    20  var _ErrorCode_index = [...]uint8{0, 4, 8, 24, 34, 39}
    21  
    22  func (i ErrorCode) String() string {
    23  	if i < 0 || i >= ErrorCode(len(_ErrorCode_index)-1) {
    24  		return "ErrorCode(" + strconv.FormatInt(int64(i), 10) + ")"
    25  	}
    26  	return _ErrorCode_name[_ErrorCode_index[i]:_ErrorCode_index[i+1]]
    27  }