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:
Silvin Lubecki 2019-04-02 11:20:59 +02:00 committed by Sebastiaan van Stijn
parent 60aa890a06
commit fe1a85f1e9
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
} }