mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
Update server.go
Refactor: Removed unnecessary else block and redundant variable assignment
This commit is contained in:
parent
52e24a02ef
commit
051a1e99c1
@ -133,9 +133,10 @@ for more information about scheduling and the kube-scheduler component.`,
|
||||
// runCommand runs the scheduler.
|
||||
func runCommand(cmd *cobra.Command, opts *options.Options, registryOptions ...Option) error {
|
||||
verflag.PrintAndExitIfRequested()
|
||||
fg := opts.ComponentGlobalsRegistry.FeatureGateFor(utilversion.DefaultKubeComponent)
|
||||
// Activate logging as soon as possible, after that
|
||||
// show flags with the final logging configuration.
|
||||
if err := logsapi.ValidateAndApply(opts.Logs, opts.ComponentGlobalsRegistry.FeatureGateFor(utilversion.DefaultKubeComponent)); err != nil {
|
||||
if err := logsapi.ValidateAndApply(opts.Logs, fg); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "%v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user