-
Notifications
You must be signed in to change notification settings - Fork 0
/
argdataflags_string.go
40 lines (32 loc) · 1.06 KB
/
argdataflags_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
// Code generated by "stringer -type=ArgDataFlags"; 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[ArgDataHasDef-0]
_ = x[ArgDataValSet-1]
_ = x[ArgDataFlagsN-2]
}
const _ArgDataFlags_name = "ArgDataHasDefArgDataValSetArgDataFlagsN"
var _ArgDataFlags_index = [...]uint8{0, 13, 26, 39}
func (i ArgDataFlags) String() string {
if i < 0 || i >= ArgDataFlags(len(_ArgDataFlags_index)-1) {
return "ArgDataFlags(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _ArgDataFlags_name[_ArgDataFlags_index[i]:_ArgDataFlags_index[i+1]]
}
func (i *ArgDataFlags) FromString(s string) error {
for j := 0; j < len(_ArgDataFlags_index)-1; j++ {
if s == _ArgDataFlags_name[_ArgDataFlags_index[j]:_ArgDataFlags_index[j+1]] {
*i = ArgDataFlags(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: ArgDataFlags")
}