Skip to content

Commit affb835

Browse files
committed
fix(#26): unify naming
1 parent 03c5e57 commit affb835

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

implementation/retry/retry.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,23 @@ type RetryImpl struct {
2828
SilenceGivingUp bool
2929
}
3030

31-
func NewWithOpts(
31+
func NewWithOptions(
3232
wrapped aurestclientapi.Client,
3333
condition aurestclientapi.RetryConditionCallback,
34-
options RetryOptions,
34+
opts RetryOptions,
3535
) aurestclientapi.Client {
3636
repeatCount := uint8(2)
37-
if options.RepeatCount > 0 {
38-
repeatCount = options.RepeatCount
37+
if opts.RepeatCount > 0 {
38+
repeatCount = opts.RepeatCount
3939
}
4040
return &RetryImpl{
4141
Wrapped: wrapped,
4242
RepeatCount: repeatCount,
4343
RetryCondition: condition,
44-
BeforeRetry: options.BeforeRetryOrNil,
44+
BeforeRetry: opts.BeforeRetryOrNil,
4545
RetryingMetricsCallback: doNothingMetricsCallback,
4646
GivingUpMetricsCallback: doNothingMetricsCallback,
47-
SilenceGivingUp: options.SilenceGivingUp,
47+
SilenceGivingUp: opts.SilenceGivingUp,
4848
}
4949
}
5050

implementation/retry/retry_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func TestFailWithRetryWithOpts(t *testing.T) {
131131
aulogging.SetupNoLoggerForTesting()
132132

133133
mock := tstMock()
134-
cut := NewWithOpts(mock,
134+
cut := NewWithOptions(mock,
135135
func(ctx context.Context, response *aurestclientapi.ParsedResponse, err error) bool {
136136
return true
137137
},

0 commit comments

Comments
 (0)