From 9843042c1c87e276c82e1f4d060dafa5a6c55dd9 Mon Sep 17 00:00:00 2001 From: Brandon Everett Date: Tue, 6 Jan 2026 10:37:09 -0500 Subject: [PATCH] fix: correct variable name in rate limit error logging example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) } ```