mirror of
https://github.com/anchore/syft.git
synced 2026-11-03 07:56:36 +01:00
add analysis coordination (with dummy analyzer)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package scope
|
||||
|
||||
import "strings"
|
||||
|
||||
const (
|
||||
UnknownScope Option = iota
|
||||
SquashedScope
|
||||
@@ -14,6 +16,21 @@ var optionStr = []string{
|
||||
"AllLayers",
|
||||
}
|
||||
|
||||
var Options = []Option{
|
||||
SquashedScope,
|
||||
AllLayersScope,
|
||||
}
|
||||
|
||||
func ParseOption(userStr string) Option {
|
||||
switch strings.ToLower(userStr) {
|
||||
case strings.ToLower(SquashedScope.String()):
|
||||
return SquashedScope
|
||||
case strings.ToLower(AllLayersScope.String()):
|
||||
return AllLayersScope
|
||||
}
|
||||
return UnknownScope
|
||||
}
|
||||
|
||||
func (o Option) String() string {
|
||||
if int(o) >= len(optionStr) || int(o) < 0 {
|
||||
return optionStr[0]
|
||||
|
||||
Reference in New Issue
Block a user