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

Function parseOptionalTaskStatus

internal/cli/task.go:2838–2848  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

2836}
2837
2838func parseOptionalTaskStatus(raw string) (taskpkg.Status, error) {
2839 trimmed := strings.ToLower(strings.TrimSpace(raw))
2840 if trimmed == "" {
2841 return "", nil
2842 }
2843 status := taskpkg.Status(trimmed)
2844 if err := status.Validate(taskStatusKey); err != nil {
2845 return "", fmt.Errorf("cli: %w", err)
2846 }
2847 return status, nil
2848}
2849
2850func parseOptionalTaskRunStatus(raw string) (taskpkg.RunStatus, error) {
2851 trimmed := strings.ToLower(strings.TrimSpace(raw))

Callers 1

parseTaskListFiltersFunction · 0.85

Calls 2

StatusMethod · 0.65
ValidateMethod · 0.65

Tested by

no test coverage detected