mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
cleanup: resolve nlreturn linter issues
nlreturn linter requires a new line before return and branch statements except when the return is alone inside a statement group (such as an if statement) to increase code clarity. This commit addresses such issues. Updates: #1586 Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
@ -49,6 +49,7 @@ func addToManager(mgr manager.Manager, config Config) error {
|
||||
return fmt.Errorf("failed to add: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -65,16 +66,19 @@ func Start(config Config) error {
|
||||
mgr, err := manager.New(clientConfig.GetConfigOrDie(), opts)
|
||||
if err != nil {
|
||||
util.ErrorLogMsg("failed to create manager %s", err)
|
||||
|
||||
return err
|
||||
}
|
||||
err = addToManager(mgr, config)
|
||||
if err != nil {
|
||||
util.ErrorLogMsg("failed to add manager %s", err)
|
||||
|
||||
return err
|
||||
}
|
||||
err = mgr.Start(signals.SetupSignalHandler())
|
||||
if err != nil {
|
||||
util.ErrorLogMsg("failed to start manager %s", err)
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user