Consolidate duplicate formatAge functions in feed TUI (gt-798p0)
This commit is contained in:
committed by
Steve Yegge
parent
4178940d39
commit
f464f87d5b
@@ -344,7 +344,7 @@ func (m *Model) renderShortHelp() string {
|
||||
// formatAge formats a duration as a short age string
|
||||
func formatAge(d time.Duration) string {
|
||||
if d < time.Minute {
|
||||
return fmt.Sprintf("%ds", int(d.Seconds()))
|
||||
return "just now"
|
||||
}
|
||||
if d < time.Hour {
|
||||
return fmt.Sprintf("%dm", int(d.Minutes()))
|
||||
|
||||
Reference in New Issue
Block a user