mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 20:42:26 +00:00
check nil
This commit is contained in:
parent
234c435827
commit
7d4b594c64
@ -58,6 +58,9 @@ func (c *Clientset) Apiregistration() v1alpha1apiregistration.ApiregistrationV1a
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,9 @@ func (c *Clientset) Apiregistration() internalversionapiregistration.Apiregistra
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
|
@ -149,6 +149,9 @@ func (c *Clientset) $.Group$() $.PackageName$.$.GroupVersion$Interface {
|
||||
var getDiscoveryTemplate = `
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() $.DiscoveryInterface|raw$ {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
`
|
||||
|
@ -47,6 +47,9 @@ func (c *Clientset) Testgroup() internalversiontestgroup.TestgroupInterface {
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
|
@ -124,6 +124,9 @@ func (c *Clientset) Federation() v1beta1federation.FederationV1beta1Interface {
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,9 @@ func (c *Clientset) Federation() internalversionfederation.FederationInterface {
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
|
@ -290,6 +290,9 @@ func (c *Clientset) Storage() v1beta1storage.StorageV1beta1Interface {
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
|
@ -167,6 +167,9 @@ func (c *Clientset) Storage() internalversionstorage.StorageInterface {
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.DiscoveryClient
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user