Repository navigation
Optional duration formatter for timer (#128) #1074
PerchAnton
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
For #128, would you accept
timer.WithFormatter(func(time.Duration) string)in Bubbles v2? It lets callers display days or use their own format. The default output stays the same, and nil restores it.The implementation and tests are ready here: PerchAnton/bubbles@c3bde0d...codex/timer-custom-format-128
Tests cover the default and custom output, zero and negative durations, nil, empty output, and updates after a tick. Full tests, race, vet, build, and the pinned linter pass on macOS with Go 1.26.10.
All reactions