code: func ValidateURLs(urls []string, requireHTTPS bool, fldPath *field.Path) field.ErrorList {
  	allErrs := field.ErrorList{}
  	for _, urlstr := range urls {
  		u, err := url.Parse(urlstr)
  		if err != nil {
  			allErrs = append(allErrs, field.Invalid(fldPath, urlstr, fmt.Sprintf("URL parse error: %v", err)))
  			continue
  		}
  		if requireHTTPS && u.Scheme != "https" {
  			allErrs = append(allErrs, field.Invalid(fldPath, urlstr, "the URL must be using the HTTPS scheme"))
  		}
  		if u.Scheme == "" {
  			allErrs = append(allErrs, field.Invalid(fldPath, urlstr, "the URL without scheme is not allowed"))
  		}
  	}
  	return allErrs
  }
docs: // ValidateURLs validates the URLs given in the string slice, makes sure they are parseable. Optionally, it can enforcs HTTPS usage.