-
Notifications
You must be signed in to change notification settings - Fork 0
/
textviewflags_string.go
45 lines (37 loc) · 1.4 KB
/
textviewflags_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=TextViewFlags"; 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[TextViewNeedsRefresh-29]
_ = x[TextViewInReLayout-30]
_ = x[TextViewRenderScrolls-31]
_ = x[TextViewFocusActive-32]
_ = x[TextViewHasLineNos-33]
_ = x[TextViewLastWasTabAI-34]
_ = x[TextViewLastWasUndo-35]
_ = x[TextViewFlagsN-36]
}
const _TextViewFlags_name = "TextViewNeedsRefreshTextViewInReLayoutTextViewRenderScrollsTextViewFocusActiveTextViewHasLineNosTextViewLastWasTabAITextViewLastWasUndoTextViewFlagsN"
var _TextViewFlags_index = [...]uint8{0, 20, 38, 59, 78, 96, 116, 135, 149}
func (i TextViewFlags) String() string {
i -= 29
if i < 0 || i >= TextViewFlags(len(_TextViewFlags_index)-1) {
return "TextViewFlags(" + strconv.FormatInt(int64(i+29), 10) + ")"
}
return _TextViewFlags_name[_TextViewFlags_index[i]:_TextViewFlags_index[i+1]]
}
func StringToTextViewFlags(s string) (TextViewFlags, error) {
for i := 0; i < len(_TextViewFlags_index)-1; i++ {
if s == _TextViewFlags_name[_TextViewFlags_index[i]:_TextViewFlags_index[i+1]] {
return TextViewFlags(i + 29), nil
}
}
return 0, errors.New("String: " + s + " is not a valid option for type: TextViewFlags")
}