MCPcopy Create free account
hub / github.com/driangle/taskmd / printOptionalField

Function printOptionalField

apps/cli/internal/cli/get.go:444–457  ·  view source on GitHub ↗
(w io.Writer, label, value string, r *lipgloss.Renderer)

Source from the content-addressed store, hash-verified

442}
443
444func printOptionalField(w io.Writer, label, value string, r *lipgloss.Renderer) {
445 if value != "" {
446 var colored string
447 switch label {
448 case "Priority":
449 colored = formatPriority(value, r)
450 case "Effort":
451 colored = formatEffort(value, r)
452 default:
453 colored = value
454 }
455 fmt.Fprintf(w, "%s %s\n", formatLabel(label+":", r), colored)
456 }
457}
458
459func printTags(w io.Writer, tags []string, r *lipgloss.Renderer) {
460 if len(tags) > 0 {

Callers 1

outputGetTextFunction · 0.85

Calls 3

formatPriorityFunction · 0.85
formatEffortFunction · 0.85
formatLabelFunction · 0.85

Tested by

no test coverage detected