nextColumnDisplayName returns the display header for a column. Special columns get custom names; others are title-cased.
(col string)
| 426 | // nextColumnDisplayName returns the display header for a column. |
| 427 | // Special columns get custom names; others are title-cased. |
| 428 | func nextColumnDisplayName(col string) string { |
| 429 | switch col { |
| 430 | case "rank": |
| 431 | return "#" |
| 432 | case "id": |
| 433 | return "ID" |
| 434 | case "deps": |
| 435 | return "Deps" |
| 436 | case "project": |
| 437 | return "Project" |
| 438 | default: |
| 439 | if len(col) == 0 { |
| 440 | return col |
| 441 | } |
| 442 | return strings.ToUpper(col[:1]) + col[1:] |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | // colorizeNextColumn returns the column value with color formatting applied. |
| 447 | func colorizeNextColumn(rec *Recommendation, column string, r *lipgloss.Renderer) string { |
no outgoing calls
no test coverage detected