// SplitAddress splits an address of the form "protocol://host:port" into its
// components. If no protocol is given, defaultProtocol is used.
// This function uses net.SplitHostPort and ParseAddress.
SplitAddress splits an address of the form "protocol://host:port" into its
components. If no protocol is given, defaultProtocol is used.
This function uses net.SplitHostPort and ParseAddress.
// SplitAddress splits an address of the form " protocol : // host : port " into its // components . If no protocol is given defaultProtocol is used . // This function uses net . SplitHostPort and ParseAddress .
func SplitAddress(addressString string, defaultProtocol string) (protocol, host, port string, err error) {
	protocol, host = ParseAddress(addressString, defaultProtocol)
	if protocol == "unix" || protocol == "unixgram" || protocol == "unixpacket" {
		return
	}
	host, port, err = net.SplitHostPort(host)
	return
}
func SplitAddress ( addressString string , defaultProtocol string ) ( protocol , host , port string , err error ) { protocol , host = ParseAddress ( addressString , defaultProtocol ) if protocol == " " || protocol == " " || protocol == " " { return } host , port , err = net . SplitHostPort ( host ) return }
SplitAddress splits an address of the form "protocol://host:port" into its
components.
SplitAddress splits an address of the form " protocol : // host : port " into its components .