errors: use %w verb directive (#419)

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
Bobby DeSimone 2019-12-03 20:02:43 -08:00 committed by GitHub
parent 74cd9eabbb
commit 12bae5cc43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 32 additions and 32 deletions

View file

@ -21,7 +21,7 @@ func NewAEADCipher(secret []byte) (cipher.AEAD, error) {
func NewAEADCipherFromBase64(s string) (cipher.AEAD, error) {
decoded, err := base64.StdEncoding.DecodeString(s)
if err != nil {
return nil, fmt.Errorf("cryptutil: invalid base64: %v", err)
return nil, fmt.Errorf("cryptutil: invalid base64: %w", err)
}
return NewAEADCipher(decoded)
}