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

@ -3,6 +3,7 @@ package internal
import (
"strings"
"github.com/pkg/errors"
"golang.org/x/crypto/openpgp/armor"
)
@ -11,7 +12,7 @@ func Unarmor(input string) (*armor.Block, error) {
io := strings.NewReader(input)
b, err := armor.Decode(io)
if err != nil {
return nil, err
return nil, errors.Wrap(err, "gopenpgp: unable to armor")
}
return b, nil
}