From 1e7add9f4b68316b96a81ecb8d028121d3909f72 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 17 Feb 2025 13:39:57 +0100 Subject: [PATCH] cli/internal/oauth/api: fix "unused-receiver" linting cli/internal/oauth/api/api.go:227:7: unused-receiver: method receiver 'a' is not referenced in method's body, consider removing or renaming it as _ (revive) func (a API) GetAutoPAT(ctx context.Context, audience string, res TokenResponse) (string, error) { ^ Signed-off-by: Sebastiaan van Stijn --- cli/internal/oauth/api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/internal/oauth/api/api.go b/cli/internal/oauth/api/api.go index 98c981f029..cd9ceb7da1 100644 --- a/cli/internal/oauth/api/api.go +++ b/cli/internal/oauth/api/api.go @@ -224,7 +224,7 @@ func postForm(ctx context.Context, reqURL string, data io.Reader) (*http.Respons return http.DefaultClient.Do(req) } -func (a API) GetAutoPAT(ctx context.Context, audience string, res TokenResponse) (string, error) { +func (API) GetAutoPAT(ctx context.Context, audience string, res TokenResponse) (string, error) { patURL := audience + "/v2/access-tokens/desktop-generate" req, err := http.NewRequestWithContext(ctx, http.MethodPost, patURL, nil) if err != nil {