code: func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (resources *metav1.APIResourceList, err error) {
  	url := url.URL{}
  	if len(groupVersion) == 0 {
  		return nil, fmt.Errorf("groupVersion shouldn't be empty")
  	}
  	if len(d.LegacyPrefix) > 0 && groupVersion == "v1" {
  		url.Path = d.LegacyPrefix + "/" + groupVersion
  	} else {
  		url.Path = "/apis/" + groupVersion
  	}
  	resources = &metav1.APIResourceList{
  		GroupVersion: groupVersion,
  	}
  	err = d.restClient.Get().AbsPath(url.String()).Do().Into(resources)
  	if err != nil {
  		// ignore 403 or 404 error to be compatible with an v1.0 server.
  		if groupVersion == "v1" && (errors.IsNotFound(err) || errors.IsForbidden(err)) {
  			return resources, nil
  		}
  		return nil, err
  	}
  	return resources, nil
  }
docs: // ServerResourcesForGroupVersion returns the supported resources for a group and version.