identity/identity.go
Function getKeyPair
has 5 return statements (exceeds 4 allowed). Wontfix
Wontfix
func getKeyPair(storage interfaces.Storage) (crypto.PrivKey, crypto.PubKey, error) {
privateKeyBytes, err := storage.Get([]byte(privateKeyDbKey))
if !errors.IsEmpty(err) {
return nil, nil, errors.E(errors.Op("Get private key from storage"), err)
}
Function storeKeyPair
has 5 return statements (exceeds 4 allowed). Wontfix
Wontfix
func storeKeyPair(storage interfaces.Storage, privateKey crypto.PrivKey, publicKey crypto.PubKey) error {
privateKeyBytes, err := crypto.MarshalPrivateKey(privateKey)
if !errors.IsEmpty(err) {
return errors.E(errors.Op("Marshal Private Key"), err)
}