mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-09 10:59:57 +00:00
Fix staticchecks in vendor/k8s.io/client-go
Kubernetes-commit: 13c017056c924e148113e42786a511ed2fee7594
This commit is contained in:
committed by
Kubernetes Publisher
parent
5682372f35
commit
3450a048bc
@@ -58,7 +58,7 @@ func NewDiscoveryCategoryExpander(client discovery.DiscoveryInterface) CategoryE
|
||||
// Expand fulfills CategoryExpander
|
||||
func (e discoveryCategoryExpander) Expand(category string) ([]schema.GroupResource, bool) {
|
||||
// Get all supported resources for groups and versions from server, if no resource found, fallback anyway.
|
||||
apiResourceLists, _ := e.discoveryClient.ServerResources()
|
||||
_, apiResourceLists, _ := e.discoveryClient.ServerGroupsAndResources()
|
||||
if len(apiResourceLists) == 0 {
|
||||
return nil, false
|
||||
}
|
||||
|
@@ -84,7 +84,7 @@ func (e shortcutExpander) getShortcutMappings() ([]*metav1.APIResourceList, []re
|
||||
res := []resourceShortcuts{}
|
||||
// get server resources
|
||||
// This can return an error *and* the results it was able to find. We don't need to fail on the error.
|
||||
apiResList, err := e.discoveryClient.ServerResources()
|
||||
_, apiResList, err := e.discoveryClient.ServerGroupsAndResources()
|
||||
if err != nil {
|
||||
klog.V(1).Infof("Error loading discovery information: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user