Skip to content

Commit

Permalink
Make error check more compact
Browse files Browse the repository at this point in the history
  • Loading branch information
Aron Wussler committed Apr 4, 2024
1 parent 2c573d9 commit 2f6d6de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crypto/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ func NewKeyRingFromBinary(binKeys []byte) (*KeyRing, error) {
return nil, errors.Wrap(err, "gopenpgp: error in reading keyring")
}

err = keyring.AddKey(key)
if err != nil {
if err = keyring.AddKey(key); err != nil {
return nil, errors.Wrap(err, "gopenpgp: error in reading keyring")
}
}
Expand Down

0 comments on commit 2f6d6de

Please sign in to comment.