Skip to content

Commit

Permalink
Autofix issues in 9 files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
deepsource-autofix[bot] authored Jan 31, 2022
1 parent 49c3a59 commit cc70eba
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion accesstoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions grants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion grantsSSH.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")
}

Expand Down
2 changes: 1 addition & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "")
}

Expand Down
2 changes: 1 addition & 1 deletion mytoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions revoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion tokeninfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit cc70eba

Please sign in to comment.