forked from gosnmp/gosnmp
-
Notifications
You must be signed in to change notification settings - Fork 4
/
asn1ber_string.go
37 lines (32 loc) · 1.14 KB
/
asn1ber_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
// Code generated by "stringer -type Asn1BER"; DO NOT EDIT.
package gosnmp
import "strconv"
const (
_Asn1BER_name_0 = "EndOfContentsBooleanIntegerBitStringOctetStringNullObjectIdentifierObjectDescription"
_Asn1BER_name_1 = "IPAddressCounter32Gauge32TimeTicksOpaqueNsapAddressCounter64Uinteger32"
_Asn1BER_name_2 = "OpaqueFloatOpaqueDouble"
_Asn1BER_name_3 = "NoSuchObjectNoSuchInstanceEndOfMibView"
)
var (
_Asn1BER_index_0 = [...]uint8{0, 13, 20, 27, 36, 47, 51, 67, 84}
_Asn1BER_index_1 = [...]uint8{0, 9, 18, 25, 34, 40, 51, 60, 70}
_Asn1BER_index_2 = [...]uint8{0, 11, 23}
_Asn1BER_index_3 = [...]uint8{0, 12, 26, 38}
)
func (i Asn1BER) String() string {
switch {
case 0 <= i && i <= 7:
return _Asn1BER_name_0[_Asn1BER_index_0[i]:_Asn1BER_index_0[i+1]]
case 64 <= i && i <= 71:
i -= 64
return _Asn1BER_name_1[_Asn1BER_index_1[i]:_Asn1BER_index_1[i+1]]
case 120 <= i && i <= 121:
i -= 120
return _Asn1BER_name_2[_Asn1BER_index_2[i]:_Asn1BER_index_2[i+1]]
case 128 <= i && i <= 130:
i -= 128
return _Asn1BER_name_3[_Asn1BER_index_3[i]:_Asn1BER_index_3[i+1]]
default:
return "Asn1BER(" + strconv.FormatInt(int64(i), 10) + ")"
}
}