-
Notifications
You must be signed in to change notification settings - Fork 0
/
neurflags_string.go
42 lines (34 loc) · 1.06 KB
/
neurflags_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
// Code generated by "stringer -type=NeurFlags"; DO NOT EDIT.
package leabra
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[NeurOff-0]
_ = x[NeurHasExt-1]
_ = x[NeurHasTarg-2]
_ = x[NeurHasCmpr-3]
_ = x[NeurFlagsN-4]
}
const _NeurFlags_name = "NeurOffNeurHasExtNeurHasTargNeurHasCmprNeurFlagsN"
var _NeurFlags_index = [...]uint8{0, 7, 17, 28, 39, 49}
func (i NeurFlags) String() string {
if i < 0 || i >= NeurFlags(len(_NeurFlags_index)-1) {
return "NeurFlags(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _NeurFlags_name[_NeurFlags_index[i]:_NeurFlags_index[i+1]]
}
func (i *NeurFlags) FromString(s string) error {
for j := 0; j < len(_NeurFlags_index)-1; j++ {
if s == _NeurFlags_name[_NeurFlags_index[j]:_NeurFlags_index[j+1]] {
*i = NeurFlags(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: NeurFlags")
}