mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Merge pull request #127226 from myeunee/cleanup
Clean up unnecessary else block and redundant variable assignment
This commit is contained in:
@@ -168,10 +168,10 @@ func Run(ctx context.Context, cc *schedulerserverconfig.CompletedConfig, sched *
|
||||
logger.Info("Golang settings", "GOGC", os.Getenv("GOGC"), "GOMAXPROCS", os.Getenv("GOMAXPROCS"), "GOTRACEBACK", os.Getenv("GOTRACEBACK"))
|
||||
|
||||
// Configz registration.
|
||||
if cz, err := configz.New("componentconfig"); err == nil {
|
||||
cz.Set(cc.ComponentConfig)
|
||||
} else {
|
||||
if cz, err := configz.New("componentconfig"); err != nil {
|
||||
return fmt.Errorf("unable to register configz: %s", err)
|
||||
} else {
|
||||
cz.Set(cc.ComponentConfig)
|
||||
}
|
||||
|
||||
// Start events processing pipeline.
|
||||
|
Reference in New Issue
Block a user