-
Notifications
You must be signed in to change notification settings - Fork 0
/
dropmods_string.go
43 lines (35 loc) · 1.06 KB
/
dropmods_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=DropMods"; 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[NoDropMod-0]
_ = x[DropCopy-1]
_ = x[DropMove-2]
_ = x[DropLink-3]
_ = x[DropIgnore-4]
_ = x[DropModsN-5]
}
const _DropMods_name = "NoDropModDropCopyDropMoveDropLinkDropIgnoreDropModsN"
var _DropMods_index = [...]uint8{0, 9, 17, 25, 33, 43, 52}
func (i DropMods) String() string {
if i < 0 || i >= DropMods(len(_DropMods_index)-1) {
return "DropMods(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _DropMods_name[_DropMods_index[i]:_DropMods_index[i+1]]
}
func (i *DropMods) FromString(s string) error {
for j := 0; j < len(_DropMods_index)-1; j++ {
if s == _DropMods_name[_DropMods_index[j]:_DropMods_index[j+1]] {
*i = DropMods(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: DropMods")
}