Open
Conversation
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
| return alg, key, nil | ||
| } | ||
| switch v := key.(type) { | ||
| case *ecdsa.PrivateKey: |
Contributor
There was a problem hiding this comment.
The linter bizarrely crashes around here with the error:
Error: corim/signer.go:156:7: previous case (typecheck)
case *ecdsa.PrivateKey:
^
Collaborator
Author
There was a problem hiding this comment.
PrivateKey extends PublicKey in ecdsa, so maybe it doesn't like that they're both tested in the same switch. Even if it's legal to the Golang typechecker.
Contributor
There was a problem hiding this comment.
Thanks for the attempt (9a86440). Unfortunately, we now have two errors rather than one :-)
Error: corim/signer.go:158:7: previous case (typecheck)
case *ecdsa.PrivateKey:
^
Error: corim/signer.go:169:7: previous case (typecheck)
case *ecdsa.PublicKey:
^
Contributor
There was a problem hiding this comment.
I suggest we use staticcheck instead.
Collaborator
Author
There was a problem hiding this comment.
I've created a PR to fix all the linter problems except the documentation lint that I can rebase on top of when it's merged.
The linter does not appear to like that ecdsa.PrivateKey contains an unnamed ecdsa.PublicKey. Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
aee3d11 to
e12b637
Compare
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
veraison/cocli#35