-
Notifications
You must be signed in to change notification settings - Fork 0
/
shapes_string.go
55 lines (47 loc) · 1.36 KB
/
shapes_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
48
49
50
51
52
53
54
55
// Code generated by "stringer -type=Shapes"; DO NOT EDIT.
package cursor
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[Arrow-0]
_ = x[Cross-1]
_ = x[DragCopy-2]
_ = x[DragMove-3]
_ = x[DragLink-4]
_ = x[HandPointing-5]
_ = x[HandOpen-6]
_ = x[HandClosed-7]
_ = x[Help-8]
_ = x[IBeam-9]
_ = x[Not-10]
_ = x[UpDown-11]
_ = x[LeftRight-12]
_ = x[UpRight-13]
_ = x[UpLeft-14]
_ = x[AllArrows-15]
_ = x[Wait-16]
_ = x[ShapesN-17]
}
const _Shapes_name = "ArrowCrossDragCopyDragMoveDragLinkHandPointingHandOpenHandClosedHelpIBeamNotUpDownLeftRightUpRightUpLeftAllArrowsWaitShapesN"
var _Shapes_index = [...]uint8{0, 5, 10, 18, 26, 34, 46, 54, 64, 68, 73, 76, 82, 91, 98, 104, 113, 117, 124}
func (i Shapes) String() string {
if i < 0 || i >= Shapes(len(_Shapes_index)-1) {
return "Shapes(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _Shapes_name[_Shapes_index[i]:_Shapes_index[i+1]]
}
func (i *Shapes) FromString(s string) error {
for j := 0; j < len(_Shapes_index)-1; j++ {
if s == _Shapes_name[_Shapes_index[j]:_Shapes_index[j+1]] {
*i = Shapes(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: Shapes")
}