sprawl/sprawl

View on GitHub
identity/identity.go

Summary

Maintainability
A
0 mins
Test Coverage

Function getKeyPair has 5 return statements (exceeds 4 allowed).
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)
    }
Severity: Major
Found in identity/identity.go - About 35 mins to fix

    Function storeKeyPair has 5 return statements (exceeds 4 allowed).
    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)
        }
    Severity: Major
    Found in identity/identity.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status