-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtapecolor_string.go
64 lines (59 loc) · 2.06 KB
/
tapecolor_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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Code generated by "stringer -trimprefix tapeColor -type TapeColor"; DO NOT EDIT.
package ptouchgo
import "strconv"
const (
_TapeColor_name_0 = "WhiteOtherClearRedBlueYellowGreenBlackClearWhiteText"
_TapeColor_name_1 = "MatteWhiteMatteClearMatteSilverSatinGoldSatinSilver"
_TapeColor_name_2 = "DBlueDRed"
_TapeColor_name_3 = "FluorescentOrangeFluorescentyellow"
_TapeColor_name_4 = "BerryPinkLightGrayLimeGreen"
_TapeColor_name_5 = "FYellowFPingFBlue"
_TapeColor_name_6 = "HeatShrinkWhite"
_TapeColor_name_7 = "FlexWhiteFlexYellow"
_TapeColor_name_8 = "CleaningStencil"
_TapeColor_name_9 = "Invalid"
)
var (
_TapeColor_index_0 = [...]uint8{0, 5, 10, 15, 18, 22, 28, 33, 38, 52}
_TapeColor_index_1 = [...]uint8{0, 10, 20, 31, 40, 51}
_TapeColor_index_2 = [...]uint8{0, 5, 9}
_TapeColor_index_3 = [...]uint8{0, 17, 34}
_TapeColor_index_4 = [...]uint8{0, 9, 18, 27}
_TapeColor_index_5 = [...]uint8{0, 7, 12, 17}
_TapeColor_index_7 = [...]uint8{0, 9, 19}
_TapeColor_index_8 = [...]uint8{0, 8, 15}
)
func (i TapeColor) String() string {
switch {
case 1 <= i && i <= 9:
i -= 1
return _TapeColor_name_0[_TapeColor_index_0[i]:_TapeColor_index_0[i+1]]
case 32 <= i && i <= 36:
i -= 32
return _TapeColor_name_1[_TapeColor_index_1[i]:_TapeColor_index_1[i+1]]
case 48 <= i && i <= 49:
i -= 48
return _TapeColor_name_2[_TapeColor_index_2[i]:_TapeColor_index_2[i+1]]
case 64 <= i && i <= 65:
i -= 64
return _TapeColor_name_3[_TapeColor_index_3[i]:_TapeColor_index_3[i+1]]
case 80 <= i && i <= 82:
i -= 80
return _TapeColor_name_4[_TapeColor_index_4[i]:_TapeColor_index_4[i+1]]
case 96 <= i && i <= 98:
i -= 96
return _TapeColor_name_5[_TapeColor_index_5[i]:_TapeColor_index_5[i+1]]
case i == 112:
return _TapeColor_name_6
case 144 <= i && i <= 145:
i -= 144
return _TapeColor_name_7[_TapeColor_index_7[i]:_TapeColor_index_7[i+1]]
case 240 <= i && i <= 241:
i -= 240
return _TapeColor_name_8[_TapeColor_index_8[i]:_TapeColor_index_8[i+1]]
case i == 255:
return _TapeColor_name_9
default:
return "TapeColor(" + strconv.FormatInt(int64(i), 10) + ")"
}
}