mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Restrict cz variable scope within else clause
This commit is contained in:
parent
2faaedbe39
commit
9cc65ce872
@ -171,8 +171,9 @@ func Run(ctx context.Context, cc *schedulerserverconfig.CompletedConfig, sched *
|
|||||||
// Configz registration.
|
// Configz registration.
|
||||||
if cz, err := configz.New("componentconfig"); err != nil {
|
if cz, err := configz.New("componentconfig"); err != nil {
|
||||||
return fmt.Errorf("unable to register configz: %s", err)
|
return fmt.Errorf("unable to register configz: %s", err)
|
||||||
|
} else {
|
||||||
|
cz.Set(cc.ComponentConfig)
|
||||||
}
|
}
|
||||||
cz.Set(cc.ComponentConfig)
|
|
||||||
|
|
||||||
// Start events processing pipeline.
|
// Start events processing pipeline.
|
||||||
cc.EventBroadcaster.StartRecordingToSink(ctx.Done())
|
cc.EventBroadcaster.StartRecordingToSink(ctx.Done())
|
||||||
|
Loading…
Reference in New Issue
Block a user