code: func RemoteIP(r *http.Request) string {
  	addr := RemoteAddr(r)
  
  	// Try parsing it as "IP:port"
  	if ip, _, err := net.SplitHostPort(addr); err == nil {
  		return ip
  	}
  
  	return addr
  }
docs: // RemoteIP extracts the remote IP of the request, taking into
  // account proxy headers.