mirror of https://github.com/docker/cli.git
cli/command/trust/key_generate.go:112:9: nilness: impossible condition: nil != nil (govet)
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit f5e8387067
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
60aa890a06
commit
fe1a85f1e9
|
@ -108,8 +108,7 @@ func generateKeyAndOutputPubPEM(keyName string, privKeyStore trustmanager.KeySto
|
||||||
return pem.Block{}, err
|
return pem.Block{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
privKeyStore.AddKey(trustmanager.KeyInfo{Role: data.RoleName(keyName)}, privKey)
|
if err := privKeyStore.AddKey(trustmanager.KeyInfo{Role: data.RoleName(keyName)}, privKey); err != nil {
|
||||||
if err != nil {
|
|
||||||
return pem.Block{}, err
|
return pem.Block{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue