code: func IsURL(str string) bool {
  	if str == "" || utf8.RuneCountInString(str) >= maxURLRuneCount || len(str) <= minURLRuneCount || strings.HasPrefix(str, ".") {
  		return false
  	}
  	strTemp := str
  	if strings.Contains(str, ":") && !strings.Contains(str, "://") {
  		// support no indicated urlscheme but with colon for port number
  		// http:// is appended so url.Parse will succeed, strTemp used so it does not impact rxURL.MatchString
  		strTemp = "http://" + str
  	}
  	u, err := url.Parse(strTemp)
  	if err != nil {
  		return false
  	}
  	if strings.HasPrefix(u.Host, ".") {
  		return false
  	}
  	if u.Host == "" && (u.Path != "" && !strings.Contains(u.Path, ".")) {
  		return false
  	}
  	return rxURL.MatchString(str)
  }
docs: // IsURL check if the string is an URL.