From 5061b35502ed2280a0c0bf28d3e4fef4e4da326b Mon Sep 17 00:00:00 2001 From: prateek010 Date: Fri, 13 Dec 2024 20:58:02 +0530 Subject: [PATCH] fix lint issues --- internal/lease/lock.go | 8 ++++---- internal/types/filters.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/lease/lock.go b/internal/lease/lock.go index 250539c..0133758 100644 --- a/internal/lease/lock.go +++ b/internal/lease/lock.go @@ -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 diff --git a/internal/types/filters.go b/internal/types/filters.go index 7abf537..f7e3e76 100644 --- a/internal/types/filters.go +++ b/internal/types/filters.go @@ -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 } }