code: func ServerAPIVersions(c *Config) (groupVersions []string, err error) {
  	transport, err := TransportFor(c)
  	if err != nil {
  		return nil, err
  	}
  	client := http.Client{Transport: transport}
  
  	configCopy := *c
  	configCopy.GroupVersion = nil
  	configCopy.Prefix = ""
  	baseURL, err := defaultServerUrlFor(c)
  	if err != nil {
  		return nil, err
  	}
  	// Get the groupVersions exposed at /api
  	baseURL.Path = "/api"
  	resp, err := client.Get(baseURL.String())
  	if err != nil {
  		return nil, err
  	}
  	var v unversioned.APIVersions
  	defer resp.Body.Close()
  	err = json.NewDecoder(resp.Body).Decode(&v)
  	if err != nil {
  		return nil, fmt.Errorf("unexpected error: %v", err)
  	}
  
  	groupVersions = append(groupVersions, v.Versions...)
  	// Get the groupVersions exposed at /apis
  	baseURL.Path = "/apis"
  	resp2, err := client.Get(baseURL.String())
  	if err != nil {
  		return nil, err
  	}
  	var apiGroupList unversioned.APIGroupList
  	defer resp2.Body.Close()
  	err = json.NewDecoder(resp2.Body).Decode(&apiGroupList)
  	if err != nil {
  		return nil, fmt.Errorf("unexpected error: %v", err)
  	}
  	groupVersions = append(groupVersions, ExtractGroupVersions(&apiGroupList)...)
  
  	return groupVersions, nil
  }
docs: // ServerAPIVersions returns the GroupVersions supported by the API server.
  // It creates a RESTClient based on the passed in config, but it doesn't rely
  // on the Version, Codec, and Prefix of the config, because it uses AbsPath and
  // takes the raw response.