Skip to content

Commit f087575

Browse files
authored
Merge pull request kubernetes#127226 from myeunee/cleanup
Clean up unnecessary else block and redundant variable assignment
2 parents f01e0d6 + 9cc65ce commit f087575

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/kube-scheduler/app/server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ func Run(ctx context.Context, cc *schedulerserverconfig.CompletedConfig, sched *
168168
logger.Info("Golang settings", "GOGC", os.Getenv("GOGC"), "GOMAXPROCS", os.Getenv("GOMAXPROCS"), "GOTRACEBACK", os.Getenv("GOTRACEBACK"))
169169

170170
// Configz registration.
171-
if cz, err := configz.New("componentconfig"); err == nil {
172-
cz.Set(cc.ComponentConfig)
173-
} else {
171+
if cz, err := configz.New("componentconfig"); err != nil {
174172
return fmt.Errorf("unable to register configz: %s", err)
173+
} else {
174+
cz.Set(cc.ComponentConfig)
175175
}
176176

177177
// Start events processing pipeline.

0 commit comments

Comments
 (0)