code: func (o *APIVersionsOptions) RunAPIVersions() error {
  	// Always request fresh data from the server
  	o.discoveryClient.Invalidate()
  
  	groupList, err := o.discoveryClient.ServerGroups()
  	if err != nil {
  		return fmt.Errorf("couldn't get available api versions from server: %v", err)
  	}
  	apiVersions := metav1.ExtractGroupVersions(groupList)
  	sort.Strings(apiVersions)
  	for _, v := range apiVersions {
  		fmt.Fprintln(o.Out, v)
  	}
  	return nil
  }
docs: // RunAPIVersions does the work