From cc70eba3a0637a693f1dcf5ea93d7ebe30f7ff51 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 13:51:24 +0000 Subject: [PATCH] Autofix issues in 9 files Resolved issues in the following files via DeepSource Autofix: 1. accesstoken.go 2. grants.go 3. grantsSSH.go 4. http.go 5. mytoken.go 6. revoke.go 7. settings.go 8. tokeninfo.go 9. transfer.go --- accesstoken.go | 2 +- grants.go | 4 ++-- grantsSSH.go | 2 +- http.go | 2 +- mytoken.go | 2 +- revoke.go | 4 ++-- settings.go | 2 +- tokeninfo.go | 2 +- transfer.go | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/accesstoken.go b/accesstoken.go index a6dd8f5..3fd3177 100644 --- a/accesstoken.go +++ b/accesstoken.go @@ -17,7 +17,7 @@ func newAccessTokenEndpoint(endpoint string) *AccessTokenEndpoint { } // DoHTTPRequest performs an http request to the access token endpoint -func (at AccessTokenEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error { +func (at AccessTokenEndpoint) DoHTTPRequest(method string, req, resp interface{}) error { return doHTTPRequest(method, at.endpoint, req, resp) } diff --git a/grants.go b/grants.go index b082cd4..0217899 100644 --- a/grants.go +++ b/grants.go @@ -19,12 +19,12 @@ func newGrantsEndpoint(endpoint string) *GrantsEndpoint { } // DoHTTPRequest performs an http request to the grants endpoint -func (g GrantsEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error { +func (g GrantsEndpoint) DoHTTPRequest(method string, req, resp interface{}) error { return doHTTPRequest(method, g.endpoint, req, resp) } // DoHTTPRequestWithAuth performs an http request to the grants endpoint -func (g GrantsEndpoint) DoHTTPRequestWithAuth(method string, req interface{}, resp interface{}, mytoken string) error { +func (g GrantsEndpoint) DoHTTPRequestWithAuth(method string, req, resp interface{}, mytoken string) error { return doHTTPRequestWithAuth(method, g.endpoint, req, resp, mytoken) } diff --git a/grantsSSH.go b/grantsSSH.go index 1a88280..db4853e 100644 --- a/grantsSSH.go +++ b/grantsSSH.go @@ -22,7 +22,7 @@ func newSSHGrantEndpoint(grantsEndpoint string) *SSHGrantEndpoint { } // DoHTTPRequest performs an http request to the ssh grant endpoint -func (s SSHGrantEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error { +func (s SSHGrantEndpoint) DoHTTPRequest(method string, req, resp interface{}) error { return s.DoHTTPRequestWithAuth(method, req, resp, "") } diff --git a/http.go b/http.go index 1d87822..dbca2b8 100644 --- a/http.go +++ b/http.go @@ -17,7 +17,7 @@ const ( const mimetypeJSON = "application/json" -func doHTTPRequest(method, url string, reqBody interface{}, responseData interface{}) error { +func doHTTPRequest(method, url string, reqBody, responseData interface{}) error { return doHTTPRequestWithAuth(method, url, reqBody, responseData, "") } diff --git a/mytoken.go b/mytoken.go index fe63fde..df6ef72 100644 --- a/mytoken.go +++ b/mytoken.go @@ -17,7 +17,7 @@ func newMytokenEndpoint(endpoint string) *MytokenEndpoint { } // DoHTTPRequest performs an http request to the mytoken endpoint -func (my MytokenEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error { +func (my MytokenEndpoint) DoHTTPRequest(method string, req, resp interface{}) error { return doHTTPRequest(method, my.endpoint, req, resp) } diff --git a/revoke.go b/revoke.go index 262e9d2..4c6fca4 100644 --- a/revoke.go +++ b/revoke.go @@ -11,7 +11,7 @@ type RevocationEndpoint struct { } // DoHTTPRequest performs an http request to the revocation endpoint -func (r RevocationEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error { +func (r RevocationEndpoint) DoHTTPRequest(method string, req, resp interface{}) error { return doHTTPRequest(method, r.endpoint, req, resp) } @@ -22,7 +22,7 @@ func newRevocationEndpoint(endpoint string) *RevocationEndpoint { } // Revoke revokes the passed mytoken; if recursive is true also all subtokens (and their subtokens...) are revoked. -func (r RevocationEndpoint) Revoke(mytoken string, oidcIssuer string, recursive bool) error { +func (r RevocationEndpoint) Revoke(mytoken, oidcIssuer string, recursive bool) error { req := api.RevocationRequest{ Token: mytoken, Recursive: recursive, diff --git a/settings.go b/settings.go index 7c7c225..6a35d7b 100644 --- a/settings.go +++ b/settings.go @@ -25,7 +25,7 @@ func newUserSettingsEndpoint(endpoint string) (*UserSettingsEndpoint, error) { } // DoHTTPRequest performs an http request to the user settings endpoint -func (s UserSettingsEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error { +func (s UserSettingsEndpoint) DoHTTPRequest(method string, req, resp interface{}) error { return doHTTPRequest(method, s.endpoint, req, resp) } diff --git a/tokeninfo.go b/tokeninfo.go index 9c7218c..14134b5 100644 --- a/tokeninfo.go +++ b/tokeninfo.go @@ -17,7 +17,7 @@ func newTokeninfoEndpoint(endpoint string) *TokeninfoEndpoint { } // DoHTTPRequest performs an http request to the tokeninfo endpoint -func (info TokeninfoEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error { +func (info TokeninfoEndpoint) DoHTTPRequest(method string, req, resp interface{}) error { return doHTTPRequest(method, info.endpoint, req, resp) } diff --git a/transfer.go b/transfer.go index 873ec9f..a108c1a 100644 --- a/transfer.go +++ b/transfer.go @@ -17,7 +17,7 @@ func newTransferEndpoint(endpoint string) *TransferEndpoint { } // DoHTTPRequest performs an http request to the token transfer endpoint -func (t TransferEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error { +func (t TransferEndpoint) DoHTTPRequest(method string, req, resp interface{}) error { return doHTTPRequest(method, t.endpoint, req, resp) }