Improve error handling, fix linter (#92)

* Improve error handling, fix linter
This commit is contained in:
wussler 2020-10-29 12:42:32 +01:00 committed by GitHub
parent 6b2ac0b11c
commit 53a85837e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 194 additions and 186 deletions

View file

@ -1,6 +1,7 @@
package crypto
import (
"errors"
"regexp"
"testing"
@ -44,7 +45,8 @@ func TestVerifyTextDetachedSigWrong(t *testing.T) {
assert.EqualError(t, verificationError, "Signature Verification Error: Invalid signature")
err, _ := verificationError.(SignatureVerificationError)
err := &SignatureVerificationError{}
_ = errors.As(verificationError, err)
assert.Exactly(t, constants.SIGNATURE_FAILED, err.Status)
}