github.com/Serizao/go-winio@v0.0.0-20230906082528-f02f7f4ad6e8/pkg/etw/opcode_string.go (about)

     1  // Code generated by "stringer -type=Opcode -trimprefix=Opcode"; DO NOT EDIT.
     2  
     3  package etw
     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[OpcodeInfo-0]
    12  	_ = x[OpcodeStart-1]
    13  	_ = x[OpcodeStop-2]
    14  	_ = x[OpcodeDCStart-3]
    15  	_ = x[OpcodeDCStop-4]
    16  }
    17  
    18  const _Opcode_name = "InfoStartStopDCStartDCStop"
    19  
    20  var _Opcode_index = [...]uint8{0, 4, 9, 13, 20, 26}
    21  
    22  func (i Opcode) String() string {
    23  	if i >= Opcode(len(_Opcode_index)-1) {
    24  		return "Opcode(" + strconv.FormatInt(int64(i), 10) + ")"
    25  	}
    26  	return _Opcode_name[_Opcode_index[i]:_Opcode_index[i+1]]
    27  }