Skip to content

Commit cc70eba

Browse files
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
1 parent 49c3a59 commit cc70eba

9 files changed

+11
-11
lines changed

accesstoken.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func newAccessTokenEndpoint(endpoint string) *AccessTokenEndpoint {
1717
}
1818

1919
// DoHTTPRequest performs an http request to the access token endpoint
20-
func (at AccessTokenEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error {
20+
func (at AccessTokenEndpoint) DoHTTPRequest(method string, req, resp interface{}) error {
2121
return doHTTPRequest(method, at.endpoint, req, resp)
2222
}
2323

grants.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ func newGrantsEndpoint(endpoint string) *GrantsEndpoint {
1919
}
2020

2121
// DoHTTPRequest performs an http request to the grants endpoint
22-
func (g GrantsEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error {
22+
func (g GrantsEndpoint) DoHTTPRequest(method string, req, resp interface{}) error {
2323
return doHTTPRequest(method, g.endpoint, req, resp)
2424
}
2525

2626
// DoHTTPRequestWithAuth performs an http request to the grants endpoint
27-
func (g GrantsEndpoint) DoHTTPRequestWithAuth(method string, req interface{}, resp interface{}, mytoken string) error {
27+
func (g GrantsEndpoint) DoHTTPRequestWithAuth(method string, req, resp interface{}, mytoken string) error {
2828
return doHTTPRequestWithAuth(method, g.endpoint, req, resp, mytoken)
2929
}
3030

grantsSSH.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func newSSHGrantEndpoint(grantsEndpoint string) *SSHGrantEndpoint {
2222
}
2323

2424
// DoHTTPRequest performs an http request to the ssh grant endpoint
25-
func (s SSHGrantEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error {
25+
func (s SSHGrantEndpoint) DoHTTPRequest(method string, req, resp interface{}) error {
2626
return s.DoHTTPRequestWithAuth(method, req, resp, "")
2727
}
2828

http.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const (
1717

1818
const mimetypeJSON = "application/json"
1919

20-
func doHTTPRequest(method, url string, reqBody interface{}, responseData interface{}) error {
20+
func doHTTPRequest(method, url string, reqBody, responseData interface{}) error {
2121
return doHTTPRequestWithAuth(method, url, reqBody, responseData, "")
2222
}
2323

mytoken.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func newMytokenEndpoint(endpoint string) *MytokenEndpoint {
1717
}
1818

1919
// DoHTTPRequest performs an http request to the mytoken endpoint
20-
func (my MytokenEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error {
20+
func (my MytokenEndpoint) DoHTTPRequest(method string, req, resp interface{}) error {
2121
return doHTTPRequest(method, my.endpoint, req, resp)
2222
}
2323

revoke.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type RevocationEndpoint struct {
1111
}
1212

1313
// DoHTTPRequest performs an http request to the revocation endpoint
14-
func (r RevocationEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error {
14+
func (r RevocationEndpoint) DoHTTPRequest(method string, req, resp interface{}) error {
1515
return doHTTPRequest(method, r.endpoint, req, resp)
1616
}
1717

@@ -22,7 +22,7 @@ func newRevocationEndpoint(endpoint string) *RevocationEndpoint {
2222
}
2323

2424
// Revoke revokes the passed mytoken; if recursive is true also all subtokens (and their subtokens...) are revoked.
25-
func (r RevocationEndpoint) Revoke(mytoken string, oidcIssuer string, recursive bool) error {
25+
func (r RevocationEndpoint) Revoke(mytoken, oidcIssuer string, recursive bool) error {
2626
req := api.RevocationRequest{
2727
Token: mytoken,
2828
Recursive: recursive,

settings.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func newUserSettingsEndpoint(endpoint string) (*UserSettingsEndpoint, error) {
2525
}
2626

2727
// DoHTTPRequest performs an http request to the user settings endpoint
28-
func (s UserSettingsEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error {
28+
func (s UserSettingsEndpoint) DoHTTPRequest(method string, req, resp interface{}) error {
2929
return doHTTPRequest(method, s.endpoint, req, resp)
3030
}
3131

tokeninfo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func newTokeninfoEndpoint(endpoint string) *TokeninfoEndpoint {
1717
}
1818

1919
// DoHTTPRequest performs an http request to the tokeninfo endpoint
20-
func (info TokeninfoEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error {
20+
func (info TokeninfoEndpoint) DoHTTPRequest(method string, req, resp interface{}) error {
2121
return doHTTPRequest(method, info.endpoint, req, resp)
2222
}
2323

transfer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func newTransferEndpoint(endpoint string) *TransferEndpoint {
1717
}
1818

1919
// DoHTTPRequest performs an http request to the token transfer endpoint
20-
func (t TransferEndpoint) DoHTTPRequest(method string, req interface{}, resp interface{}) error {
20+
func (t TransferEndpoint) DoHTTPRequest(method string, req, resp interface{}) error {
2121
return doHTTPRequest(method, t.endpoint, req, resp)
2222
}
2323

0 commit comments

Comments
 (0)