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

Function getNextColumnValue

apps/cli/internal/cli/next.go:399–424  ·  view source on GitHub ↗

getNextColumnValue extracts the value for a column from a Recommendation.

(rec *Recommendation, column string)

Source from the content-addressed store, hash-verified

397
398// getNextColumnValue extracts the value for a column from a Recommendation.
399func getNextColumnValue(rec *Recommendation, column string) string {
400 switch column {
401 case "rank":
402 return fmt.Sprintf("%d", rec.Rank)
403 case "id":
404 return rec.ID
405 case "title":
406 return rec.Title
407 case "status":
408 return rec.Status
409 case "priority":
410 return rec.Priority
411 case "effort":
412 return rec.Effort
413 case "file":
414 return rec.FilePath
415 case "reason":
416 return strings.Join(rec.Reasons, ", ")
417 case "score":
418 return fmt.Sprintf("%d", rec.Score)
419 case "phase", "tags", "deps":
420 return ""
421 default:
422 return ""
423 }
424}
425
426// nextColumnDisplayName returns the display header for a column.
427// Special columns get custom names; others are title-cased.

Callers 3

projectRecRowFunction · 0.85
outputNextTableFunction · 0.85
colorizeNextColumnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected