code: func stripURLParts(url string) string {
  	// Lower case the url
  	url = strings.ToLower(url)
  
  	// Strip protocol
  	if index := strings.Index(url, "://"); index > -1 {
  		url = url[index+3:]
  	}
  
  	// Now, if the url looks like this: username:password@www.example.com/path?query=?
  	// we remove the content before the '@' symbol
  	if index := strings.Index(url, "@"); index > -1 {
  		url = url[index+1:]
  	}
  
  	// Strip path (and query with it)
  	if index := strings.Index(url, "/"); index > -1 {
  		url = url[:index]
  	} else if index := strings.Index(url, "?"); index > -1 { // Strip query if path is not found
  		url = url[:index]
  	}
  
  	// Convert domain to unicode
  	if strings.Index(url, "xn--") != -1 {
  		var err error
  		url, err = idna.ToUnicode(url)
  		if err != nil {
  			return ""
  		}
  	}
  
  	// Return domain
  	return url
  }
docs: // stripURLParts removes path, protocol & query from url and returns it.