add analysis coordination (with dummy analyzer)

This commit is contained in:
Alex Goodman
2020-05-18 11:59:33 -04:00
parent 4cbed05358
commit 1342cc5b06
13 changed files with 260 additions and 161 deletions
+17
View File
@@ -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]