MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / PriorityColor

Function PriorityColor

internal/cli/format.go:50–63  ·  view source on GitHub ↗

PriorityColor returns a *color.Color appropriate for the given priority string.

(priority string)

Source from the content-addressed store, hash-verified

48
49// PriorityColor returns a *color.Color appropriate for the given priority string.
50func PriorityColor(priority string) *color.Color {
51 switch strings.ToLower(priority) {
52 case "critical", "urgent":
53 return color.New(color.FgRed, color.Bold)
54 case "high":
55 return color.New(color.FgYellow)
56 case "medium":
57 return color.New(color.FgWhite)
58 case "low":
59 return color.New(color.Faint)
60 default:
61 return color.New(color.Reset)
62 }
63}
64
65// ColorizedStatus returns a status icon + status text with appropriate color.
66func ColorizedStatus(status string) string {

Callers 5

statusCmdFunction · 0.92
standupCmdFunction · 0.92
renderItemTableFunction · 0.85
FormatFieldSummaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected