-
Notifications
You must be signed in to change notification settings - Fork 0
/
actions_string.go
47 lines (39 loc) · 1.14 KB
/
actions_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
46
47
// Code generated by "stringer -type=Actions"; DO NOT EDIT.
package dnd
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[NoAction-0]
_ = x[Start-1]
_ = x[DropOnTarget-2]
_ = x[DropFmSource-3]
_ = x[External-4]
_ = x[Move-5]
_ = x[Enter-6]
_ = x[Exit-7]
_ = x[Hover-8]
_ = x[ActionsN-9]
}
const _Actions_name = "NoActionStartDropOnTargetDropFmSourceExternalMoveEnterExitHoverActionsN"
var _Actions_index = [...]uint8{0, 8, 13, 25, 37, 45, 49, 54, 58, 63, 71}
func (i Actions) String() string {
if i < 0 || i >= Actions(len(_Actions_index)-1) {
return "Actions(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Actions_name[_Actions_index[i]:_Actions_index[i+1]]
}
func (i *Actions) FromString(s string) error {
for j := 0; j < len(_Actions_index)-1; j++ {
if s == _Actions_name[_Actions_index[j]:_Actions_index[j+1]] {
*i = Actions(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: Actions")
}