@@ -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