More reusable stuff in cli

This commit is contained in:
Kristoffer Dalby 2022-01-25 22:11:15 +00:00
parent 1fd57a3375
commit 6e14fdf0d3
2 changed files with 7 additions and 5 deletions

View file

@ -83,7 +83,7 @@ var listPreAuthKeys = &cobra.Command{
for _, key := range response.PreAuthKeys {
expiration := "-"
if key.GetExpiration() != nil {
expiration = key.Expiration.AsTime().Format("2006-01-02 15:04:05")
expiration = ColourTime(key.Expiration.AsTime())
}
var reusable string