diff --git a/README.md b/README.md index 7d981f62998..ee3a2e195cc 100644 --- a/README.md +++ b/README.md @@ -214,8 +214,8 @@ To detect a primary API rate limit error, you can check if the error is a ```go repos, _, err := client.Repositories.List(ctx, "", nil) var rateErr *github.RateLimitError -if errors.As(err, &rateError) { - log.Printf("hit primary rate limit, used %v of %v\n", rateErr.Rate.Used, rateErr.rate.Limit) +if errors.As(err, &rateErr) { + log.Printf("hit primary rate limit, used %v of %v\n", rateErr.Rate.Used, rateErr.Rate.Limit) } ```