-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathcode_string.go
More file actions
133 lines (127 loc) · 5.37 KB
/
code_string.go
File metadata and controls
133 lines (127 loc) · 5.37 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// Code generated by "stringer -type=Code"; DO NOT EDIT.
package irtt
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[ShortWrite - -1]
_ = x[InvalidDFString - -2]
_ = x[FieldsLengthTooLarge - -3]
_ = x[FieldsCapacityTooLarge - -4]
_ = x[InvalidStampAtString - -5]
_ = x[InvalidStampAtInt - -6]
_ = x[InvalidAllowStampString - -7]
_ = x[InvalidClockString - -8]
_ = x[InvalidClockInt - -9]
_ = x[BadMagic - -10]
_ = x[NoHMAC - -11]
_ = x[BadHMAC - -12]
_ = x[UnexpectedHMAC - -13]
_ = x[NonexclusiveMidpointTStamp - -14]
_ = x[InconsistentClocks - -15]
_ = x[DFNotSupported - -16]
_ = x[InvalidFlagBitsSet - -17]
_ = x[ShortParamBuffer - -18]
_ = x[ParamOverflow - -19]
_ = x[InvalidParamValue - -20]
_ = x[ProtocolVersionMismatch - -21]
_ = x[NoMatchingInterfaces - -1024]
_ = x[NoMatchingInterfacesUp - -1025]
_ = x[UnspecifiedWithSpecifiedAddresses - -1026]
_ = x[UnexpectedReplyFlag - -1027]
_ = x[NoSuitableAddressFound - -1028]
_ = x[InvalidConnToken - -1029]
_ = x[ShortInterval - -1030]
_ = x[LargeRequest - -1031]
_ = x[AddressMismatch - -1032]
_ = x[SyslogNotSupported - -1033]
_ = x[InvalidSyslogURI - -1034]
_ = x[InvalidWinAvgWindow - -2048]
_ = x[InvalidExpAvgAlpha - -2049]
_ = x[AllocateResultsPanic - -2050]
_ = x[UnexpectedOpenFlag - -2051]
_ = x[DFError - -2052]
_ = x[TTLError - -2053]
_ = x[ExpectedReplyFlag - -2054]
_ = x[ShortReply - -2055]
_ = x[StampAtMismatch - -2056]
_ = x[ClockMismatch - -2057]
_ = x[UnexpectedSequenceNumber - -2058]
_ = x[InvalidSleepFactor - -2059]
_ = x[InvalidWaitString - -2060]
_ = x[InvalidWaitFactor - -2061]
_ = x[InvalidWaitDuration - -2062]
_ = x[NoSuchAverager - -2063]
_ = x[NoSuchFiller - -2064]
_ = x[NoSuchTimer - -2065]
_ = x[NoSuchTimeSource - -2066]
_ = x[NoSuchWaiter - -2067]
_ = x[IntervalNonPositive - -2068]
_ = x[DurationNonPositive - -2069]
_ = x[ConnTokenZero - -2070]
_ = x[ServerClosed - -2071]
_ = x[OpenTimeout - -2072]
_ = x[InvalidServerRestriction - -2073]
_ = x[InvalidReceivedStatsInt - -2074]
_ = x[InvalidReceivedStatsString - -2075]
_ = x[OpenTimeoutTooShort - -2076]
_ = x[ServerFillTooLong - -2077]
_ = x[UnexpectedInitChannelClose - -2078]
_ = x[MultipleAddresses-1024]
_ = x[ServerStart-1025]
_ = x[ServerStop-1026]
_ = x[ListenerStart-1027]
_ = x[ListenerStop-1028]
_ = x[ListenerError-1029]
_ = x[Drop-1030]
_ = x[NewConn-1031]
_ = x[OpenClose-1032]
_ = x[CloseConn-1033]
_ = x[NoDSCPSupport-1034]
_ = x[ExceededDuration-1035]
_ = x[NoReceiveDstAddrSupport-1036]
_ = x[RemoveNoConn-1037]
_ = x[InvalidServerFill-1038]
_ = x[Connecting-2048]
_ = x[Connected-2049]
_ = x[WaitForPackets-2050]
_ = x[ServerRestriction-2051]
_ = x[NoTest-2052]
_ = x[ConnectedClosed-2053]
}
const (
_Code_name_0 = "UnexpectedInitChannelCloseServerFillTooLongOpenTimeoutTooShortInvalidReceivedStatsStringInvalidReceivedStatsIntInvalidServerRestrictionOpenTimeoutServerClosedConnTokenZeroDurationNonPositiveIntervalNonPositiveNoSuchWaiterNoSuchTimeSourceNoSuchTimerNoSuchFillerNoSuchAveragerInvalidWaitDurationInvalidWaitFactorInvalidWaitStringInvalidSleepFactorUnexpectedSequenceNumberClockMismatchStampAtMismatchShortReplyExpectedReplyFlagTTLErrorDFErrorUnexpectedOpenFlagAllocateResultsPanicInvalidExpAvgAlphaInvalidWinAvgWindow"
_Code_name_1 = "InvalidSyslogURISyslogNotSupportedAddressMismatchLargeRequestShortIntervalInvalidConnTokenNoSuitableAddressFoundUnexpectedReplyFlagUnspecifiedWithSpecifiedAddressesNoMatchingInterfacesUpNoMatchingInterfaces"
_Code_name_2 = "ProtocolVersionMismatchInvalidParamValueParamOverflowShortParamBufferInvalidFlagBitsSetDFNotSupportedInconsistentClocksNonexclusiveMidpointTStampUnexpectedHMACBadHMACNoHMACBadMagicInvalidClockIntInvalidClockStringInvalidAllowStampStringInvalidStampAtIntInvalidStampAtStringFieldsCapacityTooLargeFieldsLengthTooLargeInvalidDFStringShortWrite"
_Code_name_3 = "MultipleAddressesServerStartServerStopListenerStartListenerStopListenerErrorDropNewConnOpenCloseCloseConnNoDSCPSupportExceededDurationNoReceiveDstAddrSupportRemoveNoConnInvalidServerFill"
_Code_name_4 = "ConnectingConnectedWaitForPacketsServerRestrictionNoTestConnectedClosed"
)
var (
_Code_index_0 = [...]uint16{0, 26, 43, 62, 88, 111, 135, 146, 158, 171, 190, 209, 221, 237, 248, 260, 274, 293, 310, 327, 345, 369, 382, 397, 407, 424, 432, 439, 457, 477, 495, 514}
_Code_index_1 = [...]uint8{0, 16, 34, 49, 61, 74, 90, 112, 131, 164, 186, 206}
_Code_index_2 = [...]uint16{0, 23, 40, 53, 69, 87, 101, 119, 145, 159, 166, 172, 180, 195, 213, 236, 253, 273, 295, 315, 330, 340}
_Code_index_3 = [...]uint8{0, 17, 28, 38, 51, 63, 76, 80, 87, 96, 105, 118, 134, 157, 169, 186}
_Code_index_4 = [...]uint8{0, 10, 19, 33, 50, 56, 71}
)
func (i Code) String() string {
switch {
case -2078 <= i && i <= -2048:
i -= -2078
return _Code_name_0[_Code_index_0[i]:_Code_index_0[i+1]]
case -1034 <= i && i <= -1024:
i -= -1034
return _Code_name_1[_Code_index_1[i]:_Code_index_1[i+1]]
case -21 <= i && i <= -1:
i -= -21
return _Code_name_2[_Code_index_2[i]:_Code_index_2[i+1]]
case 1024 <= i && i <= 1038:
i -= 1024
return _Code_name_3[_Code_index_3[i]:_Code_index_3[i+1]]
case 2048 <= i && i <= 2053:
i -= 2048
return _Code_name_4[_Code_index_4[i]:_Code_index_4[i+1]]
default:
return "Code(" + strconv.FormatInt(int64(i), 10) + ")"
}
}