Skip to content

Commit

Permalink
fix: stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jon4hz committed Jan 18, 2024
1 parent 847c2dc commit 638747e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions section/uptime/uptime.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ func (Section) Gather(c *context.Context) error {
return nil
}

func (Section) Print(c *context.Context) string {
if c.Uptime == nil {
func (Section) Print(ctx *context.Context) string {
c := ctx.Uptime
if c == nil {
return ""
}
return "uptime: " + durafmt.Parse(c.Uptime.Uptime).LimitFirstN(2).String()
return "uptime: " + durafmt.Parse(c.Uptime).LimitFirstN(3).String()
}

0 comments on commit 638747e

Please sign in to comment.