-
Notifications
You must be signed in to change notification settings - Fork 3
/
fontcolor_string.go
45 lines (40 loc) · 1.08 KB
/
fontcolor_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
// Code generated by "stringer -trimprefix fontColor -type FontColor"; DO NOT EDIT.
package ptouchgo
import "strconv"
const (
_FontColor_name_0 = "WhiteOther"
_FontColor_name_1 = "RedBlue"
_FontColor_name_2 = "Black"
_FontColor_name_3 = "Gold"
_FontColor_name_4 = "FBlue"
_FontColor_name_5 = "CleaningStencil"
_FontColor_name_6 = "Invalid"
)
var (
_FontColor_index_0 = [...]uint8{0, 5, 10}
_FontColor_index_1 = [...]uint8{0, 3, 7}
_FontColor_index_5 = [...]uint8{0, 8, 15}
)
func (i FontColor) String() string {
switch {
case 1 <= i && i <= 2:
i -= 1
return _FontColor_name_0[_FontColor_index_0[i]:_FontColor_index_0[i+1]]
case 4 <= i && i <= 5:
i -= 4
return _FontColor_name_1[_FontColor_index_1[i]:_FontColor_index_1[i+1]]
case i == 8:
return _FontColor_name_2
case i == 10:
return _FontColor_name_3
case i == 98:
return _FontColor_name_4
case 240 <= i && i <= 241:
i -= 240
return _FontColor_name_5[_FontColor_index_5[i]:_FontColor_index_5[i+1]]
case i == 255:
return _FontColor_name_6
default:
return "FontColor(" + strconv.FormatInt(int64(i), 10) + ")"
}
}