cli/command/trust/key_generate.go:112:9: nilness: impossible condition: nil != nil (govet)

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
This commit is contained in:
Silvin Lubecki 2019-04-02 11:20:59 +02:00 committed by Sebastiaan van Stijn
parent 3a428202bf
commit f5e8387067
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 2 deletions

View File

@ -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
} }