Skip to content

Commit c0e0b91

Browse files
committed
wip
1 parent 16b8b21 commit c0e0b91

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ linters:
118118
rules:
119119
- name: exported
120120
disabled: true
121+
ireturn:
122+
reject:
123+
- anon
121124

122125
exclusions:
123126
rules:

internal/transport/retry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (c *RetryableTransport) RoundTrip(r *http.Request) (*http.Response, error)
111111
return c.Do(req)
112112
}
113113

114-
func RetryOnTransientStateError[T any, U any](action func() (T, error), waiter func() (U, error)) (T, error) { //nolint
114+
func RetryOnTransientStateError[T any, U any](action func() (T, error), waiter func() (U, error)) (T, error) {
115115
t, err := action()
116116

117117
var transientStateError *scw.TransientStateError

internal/transport/retry_aws.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import (
99
)
1010

1111
// RetryWhenAWSErrCodeEquals retries a function when it returns a specific AWS error
12-
func RetryWhenAWSErrCodeEquals[T any](ctx context.Context, codes []string, config *RetryWhenConfig[T]) (T, error) { //nolint: ireturn
12+
func RetryWhenAWSErrCodeEquals[T any](ctx context.Context, codes []string, config *RetryWhenConfig[T]) (T, error) {
1313
return retryWhen(ctx, config, func(err error) bool {
1414
return tfawserr.ErrCodeEquals(err, codes...)
1515
})
1616
}
1717

1818
// RetryWhenAWSErrCodeNotEquals retries a function until it returns a specific AWS error
19-
func RetryWhenAWSErrCodeNotEquals[T any](ctx context.Context, codes []string, config *RetryWhenConfig[T]) (T, error) { //nolint: ireturn
19+
func RetryWhenAWSErrCodeNotEquals[T any](ctx context.Context, codes []string, config *RetryWhenConfig[T]) (T, error) {
2020
return retryWhen(ctx, config, func(err error) bool {
2121
if err == nil {
2222
return true
@@ -28,7 +28,7 @@ func RetryWhenAWSErrCodeNotEquals[T any](ctx context.Context, codes []string, co
2828

2929
// retryWhen executes the function passed in the configuration object until the timeout is reached or the context is cancelled.
3030
// It will retry if the shouldRetry function returns true. It will stop if the shouldRetry function returns false.
31-
func retryWhen[T any](ctx context.Context, config *RetryWhenConfig[T], shouldRetry func(error) bool) (T, error) { //nolint: ireturn
31+
func retryWhen[T any](ctx context.Context, config *RetryWhenConfig[T], shouldRetry func(error) bool) (T, error) {
3232
retryInterval := config.Interval
3333
if DefaultWaitRetryInterval != nil {
3434
retryInterval = *DefaultWaitRetryInterval

0 commit comments

Comments
 (0)