From 4459dc2acbbf8f3407eb39200a5374c4497034a9 Mon Sep 17 00:00:00 2001 From: Sean McPherson Date: Wed, 4 Sep 2019 16:35:34 -0400 Subject: [PATCH] Rename client variable to avoid collision The client variable within NewClient collided with the struct of the same name. Renaming to c prevents that issue. --- client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index 86a4dfe..e4200c7 100644 --- a/client.go +++ b/client.go @@ -70,15 +70,15 @@ func SetURL(url string) Option { // key, which is shared between your site and reCAPTCHA. Additional // configuration options may also be provided (e.g. SetHTTPClient, SetURL). func NewClient(secret string, opts ...Option) Client { - client := &client{ + c := &client{ secret: secret, url: DefaultURL, httpClient: http.DefaultClient, } for _, opt := range opts { - opt(client) + opt(c) } - return client + return c } // Fetch makes a request to the reCAPTCHA verification endpoint using the