refactor: Use simpler error messages

This commit is contained in:
Felix Pojtinger
2021-12-09 17:48:57 +01:00
parent f73c99e5cf
commit 638e970c2a
12 changed files with 41 additions and 45 deletions
+3 -3
View File
@@ -34,7 +34,7 @@ func Keygen(
privkey = priv
pubkey = pub
} else {
return []byte{}, []byte{}, config.ErrKeygenForFormatUnsupported
return []byte{}, []byte{}, config.ErrKeygenFormatUnsupported
}
return privkey, pubkey, nil
@@ -106,7 +106,7 @@ func generateEncryptionKey(
return priv, pub, nil
default:
return []byte{}, []byte{}, config.ErrKeygenForFormatUnsupported
return []byte{}, []byte{}, config.ErrKeygenFormatUnsupported
}
}
@@ -130,6 +130,6 @@ func generateSignatureKey(
case config.SignatureFormatPGPKey:
return generateEncryptionKey(signatureFormat, password)
default:
return []byte{}, []byte{}, config.ErrKeygenForFormatUnsupported
return []byte{}, []byte{}, config.ErrKeygenFormatUnsupported
}
}