discovery/marathon/marathon.go
func targetEndpoint(task *task, port uint32, containerNet bool) string {

	var host string

	// Use the task's ipAddress field when it's in a container network
	if containerNet && len(task.IPAddresses) > 0 {
		host = task.IPAddresses[0].Address
	} else {
		host = task.Host
	}

	return net.JoinHostPort(host, fmt.Sprintf("%d", port))
}
func targetEndpoint(task *task, port uint32, containerNet bool) string {

	var host string

	// Use the task's ipAddress field when it's in a container network
	if containerNet && len(task.IPAddresses) > 0 {
		host = task.IPAddresses[0].Address
	} else {
		host = task.Host
	}

	return net.JoinHostPort(host, fmt.Sprintf("%d", port))
}
func targetEndpoint ( task * task , port uint32 , containerNet bool ) string { var host string // Use the task's ipAddress field when it's in a container network if containerNet && len ( task . IPAddresses ) > 0 { host = task . IPAddresses [ 0 ] . Address } else { host = task . Host } return net . JoinHostPort ( host , fmt . Sprintf ( " " , port ) ) }
// Generate a target endpoint string in host:port format.
Generate a target endpoint string in host : port format .