mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-22 15:09:39 +00:00
check nil
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user