Skip to content

Commit

Permalink
Write duration with best format for humans
Browse files Browse the repository at this point in the history
  • Loading branch information
wpjunior committed Jul 15, 2024
1 parent f2627b7 commit 43d5438
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tsuru/auth/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ func oidcLogin(ctx *cmd.Context, loginInfo *authTypes.SchemeInfo) error {
}

fmt.Fprintln(ctx.Stderr, "Successfully logged in via OIDC!")
fmt.Fprintf(ctx.Stderr, "The OIDC token will expiry in %s\n", time.Since(t.Expiry)*-1)
tokenExpiry := time.Since(t.Expiry) * -1
fmt.Fprintf(ctx.Stderr, "The OIDC token will expiry in %s\n", tokenExpiry.Round(time.Second))

handlerErr = config.WriteTokenV2(config.TokenV2{
Scheme: "oidc",
Expand Down

0 comments on commit 43d5438

Please sign in to comment.