code: func (d *DiscoveryClient) ServerGroups() (apiGroupList *unversioned.APIGroupList, err error) {
  	// Get the groupVersions exposed at /api
  	v := &unversioned.APIVersions{}
  	err = d.Get().AbsPath("/api").Do().Into(v)
  	apiGroup := unversioned.APIGroup{}
  	if err == nil {
  		apiGroup = apiVersionsToAPIGroup(v)
  	}
  	if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
  		return nil, err
  	}
  
  	// Get the groupVersions exposed at /apis
  	apiGroupList = &unversioned.APIGroupList{}
  	err = d.Get().AbsPath("/apis").Do().Into(apiGroupList)
  	if err != nil && !errors.IsNotFound(err) && !errors.IsForbidden(err) {
  		return nil, err
  	}
  	// to be compatible with a v1.0 server, if it's a 403 or 404, ignore and return whatever we got from /api
  	if err != nil && (errors.IsNotFound(err) || errors.IsForbidden(err)) {
  		apiGroupList = &unversioned.APIGroupList{}
  	}
  
  	// append the group retrieved from /api to the list
  	apiGroupList.Groups = append(apiGroupList.Groups, apiGroup)
  	return apiGroupList, nil
  }
docs: // ServerGroups returns the supported groups, with information like supported versions and the
  // preferred version.