-
Notifications
You must be signed in to change notification settings - Fork 0
/
filenodeflags_string.go
40 lines (32 loc) · 1.11 KB
/
filenodeflags_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=FileNodeFlags"; 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[FileNodeOpen-16]
_ = x[FileNodeSymLink-17]
_ = x[FileNodeFlagsN-18]
}
const _FileNodeFlags_name = "FileNodeOpenFileNodeSymLinkFileNodeFlagsN"
var _FileNodeFlags_index = [...]uint8{0, 12, 27, 41}
func (i FileNodeFlags) String() string {
i -= 16
if i < 0 || i >= FileNodeFlags(len(_FileNodeFlags_index)-1) {
return "FileNodeFlags(" + strconv.FormatInt(int64(i+16), 10) + ")"
}
return _FileNodeFlags_name[_FileNodeFlags_index[i]:_FileNodeFlags_index[i+1]]
}
func StringToFileNodeFlags(s string) (FileNodeFlags, error) {
for i := 0; i < len(_FileNodeFlags_index)-1; i++ {
if s == _FileNodeFlags_name[_FileNodeFlags_index[i]:_FileNodeFlags_index[i+1]] {
return FileNodeFlags(i + 16), nil
}
}
return 0, errors.New("String: " + s + " is not a valid option for type: FileNodeFlags")
}