-
Notifications
You must be signed in to change notification settings - Fork 0
/
textviewstates_string.go
43 lines (35 loc) · 1.23 KB
/
textviewstates_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
// Code generated by "stringer -type=TextViewStates"; DO NOT EDIT.
package giv
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[TextViewActive-0]
_ = x[TextViewFocus-1]
_ = x[TextViewInactive-2]
_ = x[TextViewSel-3]
_ = x[TextViewHighlight-4]
_ = x[TextViewStatesN-5]
}
const _TextViewStates_name = "TextViewActiveTextViewFocusTextViewInactiveTextViewSelTextViewHighlightTextViewStatesN"
var _TextViewStates_index = [...]uint8{0, 14, 27, 43, 54, 71, 86}
func (i TextViewStates) String() string {
if i < 0 || i >= TextViewStates(len(_TextViewStates_index)-1) {
return "TextViewStates(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _TextViewStates_name[_TextViewStates_index[i]:_TextViewStates_index[i+1]]
}
func (i *TextViewStates) FromString(s string) error {
for j := 0; j < len(_TextViewStates_index)-1; j++ {
if s == _TextViewStates_name[_TextViewStates_index[j]:_TextViewStates_index[j+1]] {
*i = TextViewStates(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: TextViewStates")
}