Browse Source

update repos example to use RateLimits

The RateLimit() func is deprecated, and should not appear in the
official example.
Yicheng Qin 10 years ago
committed by Will Norris
parent
commit
3ec5f1a72f
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      examples/repos/main.go
  2. +1
    -1
      github/github.go

+ 1
- 1
examples/repos/main.go View File

@ -24,7 +24,7 @@ func main() {
fmt.Printf("%v\n\n", github.Stringify(repos))
}
rate, _, err := client.RateLimit()
rate, _, err := client.RateLimits()
if err != nil {
fmt.Printf("Error fetching rate limit: %#v\n\n", err)
} else {


+ 1
- 1
github/github.go View File

@ -66,7 +66,7 @@ type Client struct {
// Rate specifies the current rate limit for the client as determined by the
// most recent API call. If the client is used in a multi-user application,
// this rate may not always be up-to-date. Call RateLimit() to check the
// this rate may not always be up-to-date. Call RateLimits() to check the
// current rate.
Rate Rate


Loading…
Cancel
Save