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

Function parseOptionalTaskPriority

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

Source from the content-addressed store, hash-verified

3057}
3058
3059func parseOptionalTaskPriority(raw string) (taskpkg.Priority, error) {
3060 trimmed := strings.ToLower(strings.TrimSpace(raw))
3061 if trimmed == "" {
3062 return "", errors.New("cli: --priority cannot be blank")
3063 }
3064 priority := taskpkg.Priority(trimmed)
3065 if err := priority.Validate("priority"); err != nil {
3066 return "", fmt.Errorf("cli: %w", err)
3067 }
3068 return priority, nil
3069}
3070
3071func validateTaskChannelFlag(channel string) error {
3072 trimmed := strings.TrimSpace(channel)

Callers 2

buildTaskUpdateRequestFunction · 0.85

Calls 2

PriorityMethod · 0.65
ValidateMethod · 0.65

Tested by

no test coverage detected