mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
check for existence of options struct
Change-Id: I6509f7fc50d0f2c7d41185e1d4e986f000ea3272
This commit is contained in:
parent
51be88a845
commit
4f03514609
@ -67,7 +67,10 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) {
|
||||
|
||||
// Apply applies parameters into global configuration of metrics.
|
||||
func (o *Options) Apply() {
|
||||
if o != nil && len(o.ShowHiddenMetricsForVersion) > 0 {
|
||||
if o == nil {
|
||||
return
|
||||
}
|
||||
if len(o.ShowHiddenMetricsForVersion) > 0 {
|
||||
SetShowHidden()
|
||||
}
|
||||
// set disabled metrics
|
||||
|
Loading…
Reference in New Issue
Block a user