getNextColumnValue extracts the value for a column from a Recommendation.
(rec *Recommendation, column string)
| 397 | |
| 398 | // getNextColumnValue extracts the value for a column from a Recommendation. |
| 399 | func 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. |
no outgoing calls
no test coverage detected