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:
Sebastiaan van Stijn 2023-03-29 15:33:35 +02:00
parent c092f42b29
commit 9cc20a29ce
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 {
return err
}
if err := s.ResetTLSMaterial(o.Name, &contextTLSData); err != nil {
return err
}
return nil
return s.ResetTLSMaterial(o.Name, &contextTLSData)
}
func checkContextNameForCreation(s store.Reader, name string) error {