Joaquin Almora

CommitGen

Commit messages from your staged changes, suggested as you type.

Try it

$

Staged diff
  internal/auth/token.go
+ var (mu sync.Mutex; cached string; expiry time.Time)
+ // Token returns the cached token, refreshing it once it expires.
+ if time.Now().Before(expiry) { return cached }
+ expiry = time.Now().Add(10 * time.Minute)