Skip to content

Commit

Permalink
Add example for api.ParseRateLimit
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno M V Souza committed Jul 26, 2018
1 parent 687559d commit 3657b8e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ func ExampleDateFromString() {

// Output: 2020-01-20 00:00:00 +0000 UTC
}

func ExampleParseRateLimit() {
r, _ := api.ParseRateLimit("1/200")
fmt.Println(r.Used())

// Output: 1
}

0 comments on commit 3657b8e

Please sign in to comment.