func ParseMachineHostPort(hp string) (*MachineHostPort, error) {
	host, port, err := net.SplitHostPort(hp)
	if err != nil {
		return nil, errors.Annotatef(err, "cannot parse %q as address:port", hp)
	}
	numPort, err := strconv.Atoi(port)
	if err != nil {
		return nil, errors.Annotatef(err, "cannot parse %q port", hp)
	}
	return &MachineHostPort{
		MachineAddress: NewMachineAddress(host),
		NetPort:        NetPort(numPort),
	}, nil
}
// ParseMachineHostPort converts a string containing a
// single host and port value to a MachineHostPort.
ParseMachineHostPort converts a string containing a
single host and port value to a MachineHostPort.
// ParseMachineHostPort converts a string containing a // single host and port value to a MachineHostPort .
func ParseMachineHostPort(hp string) (*MachineHostPort, error) {
	host, port, err := net.SplitHostPort(hp)
	if err != nil {
		return nil, errors.Annotatef(err, "cannot parse %q as address:port", hp)
	}
	numPort, err := strconv.Atoi(port)
	if err != nil {
		return nil, errors.Annotatef(err, "cannot parse %q port", hp)
	}
	return &MachineHostPort{
		MachineAddress: NewMachineAddress(host),
		NetPort:        NetPort(numPort),
	}, nil
}
func ParseMachineHostPort ( hp string ) ( * MachineHostPort , error ) { host , port , err := net . SplitHostPort ( hp ) if err != nil { return nil , errors . Annotatef ( err , " " , hp ) } numPort , err := strconv . Atoi ( port ) if err != nil { return nil , errors . Annotatef ( err , " " , hp ) } return & MachineHostPort { MachineAddress : NewMachineAddress ( host ) , NetPort : NetPort ( numPort ) , } , nil }
ParseMachineHostPort converts a string containing a
single host and port value to a MachineHostPort.
ParseMachineHostPort converts a string containing a single host and port value to a MachineHostPort .