-
Notifications
You must be signed in to change notification settings - Fork 3
/
imageflags_string.go
46 lines (38 loc) · 1.27 KB
/
imageflags_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
// Code generated by "stringer -type=ImageFlags"; DO NOT EDIT.
package vgpu
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[ImageActive-0]
_ = x[ImageHostActive-1]
_ = x[ImageOwnsImage-2]
_ = x[ImageOwnsHost-3]
_ = x[ImageIsVal-4]
_ = x[DepthImage-5]
_ = x[FramebufferImage-6]
_ = x[ImageOnHostOnly-7]
_ = x[ImageFlagsN-8]
}
const _ImageFlags_name = "ImageActiveImageHostActiveImageOwnsImageImageOwnsHostImageIsValDepthImageFramebufferImageImageOnHostOnlyImageFlagsN"
var _ImageFlags_index = [...]uint8{0, 11, 26, 40, 53, 63, 73, 89, 104, 115}
func (i ImageFlags) String() string {
if i < 0 || i >= ImageFlags(len(_ImageFlags_index)-1) {
return "ImageFlags(" + strconv.FormatInt(int64(i), 10) + ")"
}
return _ImageFlags_name[_ImageFlags_index[i]:_ImageFlags_index[i+1]]
}
func (i *ImageFlags) FromString(s string) error {
for j := 0; j < len(_ImageFlags_index)-1; j++ {
if s == _ImageFlags_name[_ImageFlags_index[j]:_ImageFlags_index[j+1]] {
*i = ImageFlags(j)
return nil
}
}
return errors.New("String: " + s + " is not a valid option for type: ImageFlags")
}