with package id

This commit is contained in:
Alex Goodman
2020-05-29 16:06:31 -04:00
parent dcba50eaa8
commit a0e48468c2
13 changed files with 96 additions and 34 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ const (
AllLayersScope
)
type Option uint
type Option int
var optionStr = []string{
"UnknownScope",
@@ -32,7 +32,7 @@ func ParseOption(userStr string) Option {
}
func (o Option) String() string {
if int(o) >= len(optionStr) {
if int(o) >= len(optionStr) || o < 0 {
return optionStr[0]
}