MCPcopy Create free account
hub / github.com/compozy/agh / parseOptionalAutomationScope

Function parseOptionalAutomationScope

internal/cli/automation.go:987–997  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

985}
986
987func parseOptionalAutomationScope(raw string) (automationpkg.Scope, error) {
988 trimmed := strings.ToLower(strings.TrimSpace(raw))
989 if trimmed == "" {
990 return "", nil
991 }
992 scope := automationpkg.Scope(trimmed)
993 if err := scope.Validate(automationScopeKey); err != nil {
994 return "", fmt.Errorf("cli: %w", err)
995 }
996 return scope, nil
997}
998
999func parseOptionalAutomationSource(raw string) (automationpkg.JobSource, error) {
1000 trimmed := strings.ToLower(strings.TrimSpace(raw))

Calls 2

ScopeMethod · 0.80
ValidateMethod · 0.65

Tested by

no test coverage detected