(raw string)
| 985 | } |
| 986 | |
| 987 | func 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 | |
| 999 | func parseOptionalAutomationSource(raw string) (automationpkg.JobSource, error) { |
| 1000 | trimmed := strings.ToLower(strings.TrimSpace(raw)) |
no test coverage detected