Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek010 committed Dec 13, 2024
1 parent c6d6583 commit 5061b35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions internal/lease/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ func NewKubeLeaseLock(client kubernetes.Interface, leaseName, namespace, holderI
func (k *kubeLeaseLock) Lock(ctx context.Context) error {
backoff := wait.Backoff{
Duration: time.Second, // start with 1 second
Factor: 1.5, // multiply by 1.5 on each retry
Jitter: 0.5, // add 50% jitter to wait time on each retry
Steps: 100, // retry 100 times
Cap: time.Hour, // but never wait more than 1 hour
Factor: 1.5, //nolint:gomnd // multiply by 1.5 on each retry
Jitter: 0.5, //nolint:gomnd // add 50% jitter to wait time on each retry
Steps: 100, //nolint:gomnd // retry 100 times
Cap: time.Hour, //nolint:gomnd // but never wait more than 1 hour
}

return wait.ExponentialBackoff(backoff, func() (bool, error) { //nolint:wrapcheck
Expand Down
2 changes: 1 addition & 1 deletion internal/types/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func ParseFreeformTagFilter(filter string) (string, string, error) {
f := filter
if strings.HasPrefix(f, "freeformTags.") {
f = strings.TrimPrefix(f, "freeformTags.")
if split := strings.Split(f, "="); len(split) == 2 {
if split := strings.Split(f, "="); len(split) == 2 { //nolint:gomnd
return split[0], split[1], nil
}
}
Expand Down

0 comments on commit 5061b35

Please sign in to comment.