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>
This commit is contained in:
Sebastiaan van Stijn 2023-03-29 15:33:35 +02:00
parent be97731f1a
commit 78c474539b
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 4 deletions

View File

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