mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 20:29:56 +00:00
check for existence of options struct
Change-Id: I6509f7fc50d0f2c7d41185e1d4e986f000ea3272
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user