Skip to content

Commit 05bfdd6

Browse files
authored
Fix typo in GoDoc comment for NewConstant function (#31)
The NewConstant function will panic if the time duration is less than or equal to zero. The GoDoc comment for this function needs to be updated to say that it will panic if the given base is "less than or equal to zero" instead of "less than zero".
1 parent f54a226 commit 05bfdd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backoff_constant.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func Constant(ctx context.Context, t time.Duration, f RetryFunc) error {
1313

1414
// NewConstant creates a new constant backoff using the value t. The wait time
1515
// is the provided constant value. It panics if the given base is less than
16-
// zero.
16+
// or equal to zero.
1717
func NewConstant(t time.Duration) Backoff {
1818
if t <= 0 {
1919
panic("t must be greater than 0")

0 commit comments

Comments
 (0)