Browse Source

fix example to handle returned Response

Will Norris 13 years ago
parent
commit
21b9809ca4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      examples/example.go

+ 2
- 2
examples/example.go View File

@ -17,14 +17,14 @@ func main() {
fmt.Println("Recently updated repositories owned by user willnorris:")
opt := &github.RepositoryListOptions{Type: "owner", Sort: "updated", Direction: "desc"}
repos, err := client.Repositories.List("willnorris", opt)
repos, _, err := client.Repositories.List("willnorris", opt)
if err != nil {
fmt.Printf("error: %v\n\n", err)
} else {
fmt.Printf("%#v\n\n", repos)
}
rate, err := client.RateLimit()
rate, _, err := client.RateLimit()
if err != nil {
fmt.Printf("Error fetching rate limit: %#v\n\n", err)
} else {


Loading…
Cancel
Save