engine, pgp: Fixup incorrect error usage

Small fixups found by the next commit.
This commit is contained in:
James Shubin
2019-03-12 16:12:17 -04:00
parent 2bf43eae24
commit 54c81d6bb2
3 changed files with 8 additions and 8 deletions

View File

@@ -217,13 +217,13 @@ func ParseIdentity(identity string) (name, comment, email string, err error) {
// get name
n := strings.Split(identity, " <")
if len(n) != 2 {
return "", "", "", errwrap.Wrap(err, "user string mal formated")
return "", "", "", errwrap.Wrapf(err, "user string mal formated")
}
// get email and comment
ec := strings.Split(n[1], "> ")
if len(ec) != 2 {
return "", "", "", errwrap.Wrap(err, "user string mal formated")
return "", "", "", errwrap.Wrapf(err, "user string mal formated")
}
return n[0], ec[1], ec[0], nil