-
Notifications
You must be signed in to change notification settings - Fork 3
/
lmscomponents_string.go
45 lines (37 loc) · 1.15 KB
/
lmscomponents_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 -type=LMSComponents"; DO NOT EDIT.
package colorspace
import (
"errors"
"strconv"
)
var _ = errors.New("dummy error")
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[LC-0]
_ = x[MC-1]
_ = x[SC-2]
_ = x[LMC-3]
_ = x[LvMC-4]
_ = x[SvLMC-5]
_ = x[GREY-6]
_ = x[LMSComponentsN-7]
}
const _LMSComponents_name = "LCMCSCLMCLvMCSvLMCGREYLMSComponentsN"
var _LMSComponents_index = [...]uint8{0, 2, 4, 6, 9, 13, 18, 22, 36}
func (i LMSComponents) String() string {
if i < 0 || i >= LMSComponents(len(_LMSComponents_index)-1) {
return "LMSComponents(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _LMSComponents_name[_LMSComponents_index[i]:_LMSComponents_index[i+1]]
}
func (i *LMSComponents) FromString(s string) error {
for j := 0; j < len(_LMSComponents_index)-1; j++ {
if s == _LMSComponents_name[_LMSComponents_index[j]:_LMSComponents_index[j+1]] {
*i = LMSComponents(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: LMSComponents")
}