Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
da440dil committed Oct 7, 2019
1 parent 234e6ca commit fbe6a92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Distributed rate limiting with pluggable storage for storing counters state.
c, _ := counter.New(1, time.Millisecond*100)
// Increment counter and get remainder
if v, err := c.Count("key"); err != nil {
if e, ok := err.(locker.TTLError); ok {
if e, ok := err.(counter.TTLError); ok {
// Use e.TTL() if need
} else {
// Handle err
Expand All @@ -31,4 +31,4 @@ if v, err := c.Count("key"); err != nil {
- [example](./examples/counter-gateway-default/main.go) usage with default [gateway](./gateway/memory/memory.go)
- [example](./examples/counter-gateway-memory/main.go) usage with memory [gateway](./gateway/memory/memory.go)
- [example](./examples/counter-gateway-redis/main.go) usage with [Redis](https://redis.io) [gateway](./gateway/redis/redis.go)
- [example](./examples/counter-with-retry/main.go) usage with [retry](https://github.com/da440dil/go-trier)
- [example](./examples/counter-with-retry/main.go) usage with [retry](https://github.com/da440dil/go-trier)

0 comments on commit fbe6a92

Please sign in to comment.