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

@ -82,8 +82,7 @@ func (keyRing *KeyRing) getSigningEntity() (*openpgp.Entity, error) {
}
}
if signEntity == nil {
err := errors.New("gopenpgp: cannot sign message, unable to unlock signer key")
return signEntity, err
return nil, errors.New("gopenpgp: cannot sign message, unable to unlock signer key")
}
return signEntity, nil