Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsk committed May 25, 2017
1 parent 39ee8b4 commit 9f6af10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ if err := retry.Retry(ctx, action, Callback(AuthChecker, login), strategy.Limit(
```bash
$ retry -limit=3 -backoff=lin{10ms} -- /bin/sh -c 'echo "trying..."; exit 1'
trying...
[INFO] #2 attempt at 17.636458ms...
trying...
[INFO] #3 attempt at 48.287964ms...
trying...
[ERROR] error occurred: "exit status 1"
```
Expand Down
3 changes: 3 additions & 0 deletions cmd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,16 @@ Current version is 1.0.0.

$ retry -limit=3 -backoff=lin[10ms] -- /bin/sh -c 'echo "trying..."; exit 1'
trying...
[INFO] #2 attempt at 17.636458ms...
trying...
[INFO] #3 attempt at 48.287964ms...
trying...
[ERROR] error occurred: "exit status 1"

$ retry -timeout=500ms --infinite -- /bin/sh -c 'echo "trying..."; exit 1'
trying...
...
trying...
[INFO] #N attempt at 499.691521ms...
[ERROR] error occurred: "context deadline exceeded"
```

0 comments on commit 9f6af10

Please sign in to comment.