mirror of https://github.com/docker/cli.git
cli/command/context: remove redundant if ...; err != nil check (revive)
cli/command/context/create.go:121:2: if-return: redundant if ...; err != nil check, just return error instead. (revive)
if err := s.ResetTLSMaterial(o.Name, &contextTLSData); err != nil {
return err
}
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 78c474539b
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c092f42b29
commit
9cc20a29ce
|
@ -118,10 +118,7 @@ func createNewContext(o *CreateOptions, cli command.Cli, s store.Writer) error {
|
||||||
if err := s.CreateOrUpdate(contextMetadata); err != nil {
|
if err := s.CreateOrUpdate(contextMetadata); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := s.ResetTLSMaterial(o.Name, &contextTLSData); err != nil {
|
return s.ResetTLSMaterial(o.Name, &contextTLSData)
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkContextNameForCreation(s store.Reader, name string) error {
|
func checkContextNameForCreation(s store.Reader, name string) error {
|
||||||
|
|
Loading…
Reference in New Issue