Skip to content

Commit 8e80038

Browse files
author
Dean Karn
authored
re-export ErrMaxAttemptsReached from pkg (#5)
1 parent 7196fd0 commit 8e80038

File tree

6 files changed

+20
-9
lines changed

6 files changed

+20
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [1.3.0] - 2023-05-08
10+
### Changed
11+
- re-export ErrMaxAttemptsReached from github.com/go-playground/pkg to allow for more reusable coe between packages.
12+
913
## [1.2.0] - 2023-05-07
1014
### Added
1115
- Added MaxAttempts(..) to configuration and ErrorMaxAttemptsReached to be returned by the Sleep(...) function when configured.
1216

13-
[Unreleased]: https://github.com/go-playground/backoff-sys/compare/v1.2.0...HEAD
17+
[Unreleased]: https://github.com/go-playground/backoff-sys/compare/v1.3.0...HEAD
18+
[1.3.0]: https://github.com/go-playground/backoff-sys/compare/v1.3.0...v1.2.0
1419
[1.2.0]: https://github.com/go-playground/backoff-sys/commit/v1.2.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Package backoff-sys
22

3-
<img align="right" src="https://raw.githubusercontent.com/go-playground/backoff-sys/master/logo.jpg">![Project status](https://img.shields.io/badge/version-1.2.0-green.svg)
3+
<img align="right" src="https://raw.githubusercontent.com/go-playground/backoff-sys/master/logo.jpg">![Project status](https://img.shields.io/badge/version-1.3.0-green.svg)
44
[![Actions Status](https://github.com/go-playground/backoff-sys/workflows/Lint%20%26%20Test/badge.svg)](https://github.com/go-playground/backoff-sys/actions)
55
[![GoDoc](https://godoc.org/github.com/go-playground/backoff-sys?status.svg)](https://pkg.go.dev/github.com/go-playground/backoff-sys)
66
![License](https://img.shields.io/dub/l/vibe-d.svg)

exponential.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ package backoff
22

33
import (
44
"context"
5-
"errors"
5+
"github.com/go-playground/pkg/v5/errors"
66
"math"
77
"math/rand"
88
"time"
99
)
1010

11-
var (
12-
ErrMaxAttemptsReached = errors.New("max attempts reached")
13-
)
11+
var ErrMaxAttemptsReached = errorsext.ErrMaxAttemptsReached
1412

1513
// ExponentialBuilder helps to build the final exponential backoff entity
1614
type ExponentialBuilder struct {

exponential_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package backoff
22

33
import (
4-
. "github.com/go-playground/assert/v2"
5-
64
"context"
5+
. "github.com/go-playground/assert/v2"
76
"testing"
87
"time"
98
)

go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ module github.com/go-playground/backoff-sys
22

33
go 1.14
44

5-
require github.com/go-playground/assert/v2 v2.2.0
5+
require (
6+
github.com/go-playground/assert/v2 v2.2.0
7+
github.com/go-playground/pkg/v5 v5.17.0
8+
)

go.sum

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
12
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
23
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
4+
github.com/go-playground/form/v4 v4.2.0/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U=
5+
github.com/go-playground/pkg/v5 v5.16.0 h1:A/GZ5kitZuKQOEG1zm5tD9UrQRGl69k+MSck6Vojel8=
6+
github.com/go-playground/pkg/v5 v5.16.0/go.mod h1:eT8XZeFHnqZkfkpkbI8ayjfCw9GohV2/j8STbVmoR6s=
7+
github.com/go-playground/pkg/v5 v5.17.0 h1:53iBrGO1BNTopcwem0lsBesULJZyH9OKtTntJAsE8I0=
8+
github.com/go-playground/pkg/v5 v5.17.0/go.mod h1:eT8XZeFHnqZkfkpkbI8ayjfCw9GohV2/j8STbVmoR6s=

0 commit comments

Comments
 (0)