Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cholland1989 committed May 13, 2024
1 parent d79d654 commit b34a700
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This library supports [version 1.18 and later][ver] of Go.

```go
import "github.com/cholland1989/go-delay/pkg/delay"
import "github.com/cholland1989/go-delay/pkg/retry"
import "github.com/cholland1989/go-delay/pkg/sleep"
```

Expand All @@ -39,8 +40,9 @@ representing 0.5 seconds.
jitter. For example, `delay.RandomJitter(time.Second, 0.5)` will return a
`time.Duration` between 0.5 seconds and 1.5 seconds.

Package [`sleep`](https://pkg.go.dev/github.com/cholland1989/go-delay/pkg/sleep)
provides wrapper functions to simplify the most common use case.
Package [`retry`](https://pkg.go.dev/github.com/cholland1989/go-delay/pkg/retry)
and [`sleep`](https://pkg.go.dev/github.com/cholland1989/go-delay/pkg/sleep)
provide wrapper functions to simplify the most common use cases.

See the [documentation][doc] for more details.

Expand Down
2 changes: 1 addition & 1 deletion pkg/sleep/exponential_backoff.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package sleep provides wrapper functions to simplify the most common use
// case.
// cases.
package sleep

import (
Expand Down
3 changes: 2 additions & 1 deletion pkg/sleep/rate_limit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ package sleep

import (
"context"
"io"
"testing"
"time"

"github.com/stretchr/testify/require"
)

func HealthCheck() error {
return context.Canceled
return io.EOF
}

func ExampleRateLimit() {
Expand Down

0 comments on commit b34a700

Please sign in to comment.