Skip to content

Commit

Permalink
re-export ErrMaxAttemptsReached from pkg (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Karn authored May 9, 2023
1 parent 7196fd0 commit 8e80038
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.3.0] - 2023-05-08
### Changed
- re-export ErrMaxAttemptsReached from github.com/go-playground/pkg to allow for more reusable coe between packages.

## [1.2.0] - 2023-05-07
### Added
- Added MaxAttempts(..) to configuration and ErrorMaxAttemptsReached to be returned by the Sleep(...) function when configured.

[Unreleased]: https://github.com/go-playground/backoff-sys/compare/v1.2.0...HEAD
[Unreleased]: https://github.com/go-playground/backoff-sys/compare/v1.3.0...HEAD
[1.3.0]: https://github.com/go-playground/backoff-sys/compare/v1.3.0...v1.2.0
[1.2.0]: https://github.com/go-playground/backoff-sys/commit/v1.2.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Package backoff-sys

<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)
<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)
[![Actions Status](https://github.com/go-playground/backoff-sys/workflows/Lint%20%26%20Test/badge.svg)](https://github.com/go-playground/backoff-sys/actions)
[![GoDoc](https://godoc.org/github.com/go-playground/backoff-sys?status.svg)](https://pkg.go.dev/github.com/go-playground/backoff-sys)
![License](https://img.shields.io/dub/l/vibe-d.svg)
Expand Down
6 changes: 2 additions & 4 deletions exponential.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ package backoff

import (
"context"
"errors"
"github.com/go-playground/pkg/v5/errors"
"math"
"math/rand"
"time"
)

var (
ErrMaxAttemptsReached = errors.New("max attempts reached")
)
var ErrMaxAttemptsReached = errorsext.ErrMaxAttemptsReached

// ExponentialBuilder helps to build the final exponential backoff entity
type ExponentialBuilder struct {
Expand Down
3 changes: 1 addition & 2 deletions exponential_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package backoff

import (
. "github.com/go-playground/assert/v2"

"context"
. "github.com/go-playground/assert/v2"
"testing"
"time"
)
Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ module github.com/go-playground/backoff-sys

go 1.14

require github.com/go-playground/assert/v2 v2.2.0
require (
github.com/go-playground/assert/v2 v2.2.0
github.com/go-playground/pkg/v5 v5.17.0
)
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/form/v4 v4.2.0/go.mod h1:q1a2BY+AQUUzhl6xA/6hBetay6dEIhMHjgvJiGo6K7U=
github.com/go-playground/pkg/v5 v5.16.0 h1:A/GZ5kitZuKQOEG1zm5tD9UrQRGl69k+MSck6Vojel8=
github.com/go-playground/pkg/v5 v5.16.0/go.mod h1:eT8XZeFHnqZkfkpkbI8ayjfCw9GohV2/j8STbVmoR6s=
github.com/go-playground/pkg/v5 v5.17.0 h1:53iBrGO1BNTopcwem0lsBesULJZyH9OKtTntJAsE8I0=
github.com/go-playground/pkg/v5 v5.17.0/go.mod h1:eT8XZeFHnqZkfkpkbI8ayjfCw9GohV2/j8STbVmoR6s=

0 comments on commit 8e80038

Please sign in to comment.