/
textfieldsignals_string.go
45 lines (37 loc) · 1.38 KB
/
textfieldsignals_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=TextFieldSignals"; DO NOT EDIT.
package gi
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[TextFieldDone-0]
_ = x[TextFieldDeFocused-1]
_ = x[TextFieldSelected-2]
_ = x[TextFieldCleared-3]
_ = x[TextFieldInsert-4]
_ = x[TextFieldBackspace-5]
_ = x[TextFieldDelete-6]
_ = x[TextFieldSignalsN-7]
}
const _TextFieldSignals_name = "TextFieldDoneTextFieldDeFocusedTextFieldSelectedTextFieldClearedTextFieldInsertTextFieldBackspaceTextFieldDeleteTextFieldSignalsN"
var _TextFieldSignals_index = [...]uint8{0, 13, 31, 48, 64, 79, 97, 112, 129}
func (i TextFieldSignals) String() string {
if i < 0 || i >= TextFieldSignals(len(_TextFieldSignals_index)-1) {
return "TextFieldSignals(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _TextFieldSignals_name[_TextFieldSignals_index[i]:_TextFieldSignals_index[i+1]]
}
func (i *TextFieldSignals) FromString(s string) error {
for j := 0; j < len(_TextFieldSignals_index)-1; j++ {
if s == _TextFieldSignals_name[_TextFieldSignals_index[j]:_TextFieldSignals_index[j+1]] {
*i = TextFieldSignals(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: TextFieldSignals")
}