code: func (e shortcutExpander) getShortcutMappings() ([]*metav1.APIResourceList, []resourceShortcuts, error) {
  	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()
  	if err != nil {
  		klog.V(1).Infof("Error loading discovery information: %v", err)
  	}
  	for _, apiResources := range apiResList {
  		gv, err := schema.ParseGroupVersion(apiResources.GroupVersion)
  		if err != nil {
  			klog.V(1).Infof("Unable to parse groupversion = %s due to = %s", apiResources.GroupVersion, err.Error())
  			continue
  		}
  		for _, apiRes := range apiResources.APIResources {
  			for _, shortName := range apiRes.ShortNames {
  				rs := resourceShortcuts{
  					ShortForm: schema.GroupResource{Group: gv.Group, Resource: shortName},
  					LongForm:  schema.GroupResource{Group: gv.Group, Resource: apiRes.Name},
  				}
  				res = append(res, rs)
  			}
  		}
  	}
  
  	return apiResList, res, nil
  }
docs: // getShortcutMappings returns a set of tuples which holds short names for resources.
  // First the list of potential resources will be taken from the API server.
  // Next we will append the hardcoded list of resources - to be backward compatible with old servers.
  // NOTE that the list is ordered by group priority.