Skip to content

all: remove redundant type conversion #586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions google/jwt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func TestJWTAccessTokenSourceFromJSON(t *testing.T) {
t.Fatalf("base64 DecodeString: %v\nString: %q", err, parts[0])
}
var hdr jws.Header
if err := json.Unmarshal([]byte(hdrJSON), &hdr); err != nil {
if err := json.Unmarshal(hdrJSON, &hdr); err != nil {
t.Fatalf("json.Unmarshal: %v (%q)", err, hdrJSON)
}

Expand Down Expand Up @@ -129,7 +129,7 @@ func TestJWTAccessTokenSourceWithScope(t *testing.T) {
t.Fatalf("base64 DecodeString: %v\nString: %q", err, parts[0])
}
var hdr jws.Header
if err := json.Unmarshal([]byte(hdrJSON), &hdr); err != nil {
if err := json.Unmarshal(hdrJSON, &hdr); err != nil {
t.Fatalf("json.Unmarshal: %v (%q)", err, hdrJSON)
}

Expand Down
2 changes: 1 addition & 1 deletion jira/jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (js jwtSource) Token() (*oauth2.Token, error) {
if err != nil {
return nil, err
}
v.Set("assertion", string(assertion))
v.Set("assertion", assertion)

// Fetch access token from auth server
hc := oauth2.NewClient(js.ctx, nil)
Expand Down
2 changes: 1 addition & 1 deletion jws/jws.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,5 @@ func Verify(token string, key *rsa.PublicKey) error {

h := sha256.New()
h.Write([]byte(signedContent))
return rsa.VerifyPKCS1v15(key, crypto.SHA256, h.Sum(nil), []byte(signatureString))
return rsa.VerifyPKCS1v15(key, crypto.SHA256, h.Sum(nil), signatureString)
}