Skip to content

Commit

Permalink
DUPLO-26089 fix two more lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
duplodavid committed Nov 7, 2024
1 parent 12efea2 commit 74f60f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func CacheGetAwsConfigOutput(cacheKey string) (creds *AwsConfigOutput) {

// Check credentials for expiry.
if creds != nil {
five_minutes_from_now := time.Now().UTC().Add(5 * time.Minute)
fiveMinutesFromNow := time.Now().UTC().Add(5 * time.Minute)
expiration, err := time.Parse(time.RFC3339, creds.Expiration)

// Invalid expiration?
Expand All @@ -107,7 +107,7 @@ func CacheGetAwsConfigOutput(cacheKey string) (creds *AwsConfigOutput) {
creds = nil

// Expires in five minutes or less?
} else if five_minutes_from_now.After(expiration) {
} else if fiveMinutesFromNow.After(expiration) {
creds = nil
}
}
Expand Down Expand Up @@ -189,9 +189,9 @@ func CacheGetK8sConfigOutput(cacheKey string, tenantName string) (creds *clienta
// Check credentials for expiry.
if creds != nil {
// Expires in five minutes or less?
five_minutes_from_now := time.Now().UTC().Add(5 * time.Minute)
fiveMinutesFromNow := time.Now().UTC().Add(5 * time.Minute)
expiration := creds.Status.ExpirationTimestamp.Time
if five_minutes_from_now.After(expiration) {
if fiveMinutesFromNow.After(expiration) {
creds = nil
}
}
Expand Down

0 comments on commit 74f60f7

Please sign in to comment.