code: func ValidateDiscoveryKubeConfigPath(discoveryFile string, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  	u, err := url.Parse(discoveryFile)
  	if err != nil {
  		allErrs = append(allErrs, field.Invalid(fldPath, discoveryFile, "not a valid HTTPS URL or a file on disk"))
  		return allErrs
  	}
  
  	if u.Scheme == "" {
  		// URIs with no scheme should be treated as files
  		if _, err := os.Stat(discoveryFile); os.IsNotExist(err) {
  			allErrs = append(allErrs, field.Invalid(fldPath, discoveryFile, "not a valid HTTPS URL or a file on disk"))
  		}
  		return allErrs
  	}
  
  	if u.Scheme != "https" {
  		allErrs = append(allErrs, field.Invalid(fldPath, discoveryFile, "if a URL is used, the scheme must be https"))
  	}
  	return allErrs
  }
docs: // ValidateDiscoveryKubeConfigPath validates location of a discovery file