-
Notifications
You must be signed in to change notification settings - Fork 0
/
opcode_string.go
44 lines (38 loc) · 1.19 KB
/
opcode_string.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Code generated by "stringer -type=Opcode"; DO NOT EDIT.
package splunker
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[OpcodeNop-0]
_ = x[OpcodeOldstyleEvent-1]
_ = x[OpcodeOldstyleEventWithHash-2]
_ = x[OpcodeNewHost-3]
_ = x[OpcodeNewSource-4]
_ = x[OpcodeNewSourceType-5]
_ = x[OpcodeNewString-6]
_ = x[OpcodeDelete-8]
_ = x[OpcodeSplunkPrivate-9]
_ = x[OpcodeHeader-10]
_ = x[OpcodeHashSlice-11]
}
const (
_Opcode_name_0 = "OpcodeNopOpcodeOldstyleEventOpcodeOldstyleEventWithHashOpcodeNewHostOpcodeNewSourceOpcodeNewSourceTypeOpcodeNewString"
_Opcode_name_1 = "OpcodeDeleteOpcodeSplunkPrivateOpcodeHeaderOpcodeHashSlice"
)
var (
_Opcode_index_0 = [...]uint8{0, 9, 28, 55, 68, 83, 102, 117}
_Opcode_index_1 = [...]uint8{0, 12, 31, 43, 58}
)
func (i Opcode) String() string {
switch {
case i <= 6:
return _Opcode_name_0[_Opcode_index_0[i]:_Opcode_index_0[i+1]]
case 8 <= i && i <= 11:
i -= 8
return _Opcode_name_1[_Opcode_index_1[i]:_Opcode_index_1[i+1]]
default:
return "Opcode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}