diff options
| author | Paul Bütow <1224732+snonux@users.noreply.github.com> | 2025-06-20 00:23:30 +0300 |
|---|---|---|
| committer | Paul Bütow <1224732+snonux@users.noreply.github.com> | 2025-06-20 00:23:30 +0300 |
| commit | 17ae0b210c109e625f8afb54b08de2c25f272c96 (patch) | |
| tree | cf37cacd7af2d3c837d1bd9cffeef962450c93a8 /cmd | |
| parent | 77620dcd609aa53a81effd23174d56e622f16cc8 (diff) | |
Add task manipulation helpers and tests
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/tasksamurai/main.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/tasksamurai/main.go b/cmd/tasksamurai/main.go index 658cb05..56ee08a 100644 --- a/cmd/tasksamurai/main.go +++ b/cmd/tasksamurai/main.go @@ -85,8 +85,9 @@ func formatDue(s string) string { days := int(time.Until(ts).Hours() / 24) val := fmt.Sprintf("%dd", days) + style := lipgloss.NewStyle() if days < 0 { - val = lipgloss.NewStyle().Background(lipgloss.Color("1")).Render(val) + style = style.Background(lipgloss.Color("1")) } - return val + return style.Render(val) } |
