Skip to content

Commit

Permalink
improve "wrench runners" formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots committed Dec 11, 2022
1 parent cdc792f commit 1671802
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runner_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"flag"
"fmt"
"time"

"github.com/hexops/cmder"
"github.com/hexops/wrench/internal/errors"
Expand Down Expand Up @@ -41,7 +42,9 @@ Examples:
fmt.Println("no runners found")
}
for _, runner := range resp.Runners {
fmt.Printf("'%v' (%v)\n registered: %v\n last seen: %v\n", runner.ID, runner.Arch, runner.RegisteredAt, runner.LastSeenAt)
fmt.Printf("'%v' (%v)\n", runner.ID, runner.Arch)
fmt.Printf(" registered: %v ago\n", time.Since(runner.RegisteredAt).Round(time.Hour*24))
fmt.Printf(" last seen: %v ago\n\n", time.Since(runner.LastSeenAt).Round(time.Second))
}
return nil
}
Expand Down

0 comments on commit 1671802

Please sign in to comment.