func getHost(hostPort string) string {
	for i := 0; i < len(hostPort); i++ {
		if hostPort[i] == ':' {
			return hostPort[:i]
		}
	}
	return hostPort
}
func getHost(hostPort string) string {
	for i := 0; i < len(hostPort); i++ {
		if hostPort[i] == ':' {
			return hostPort[:i]
		}
	}
	return hostPort
}
func getHost ( hostPort string ) string { for i := 0 ; i < len ( hostPort ) ; i ++ { if hostPort [ i ] == ':' { return hostPort [ : i ] } } return hostPort }
// getHost returns the host part of a host:port. If no ':' is found, it returns the
// original string. Note: This hand-rolled loop is faster than using strings.IndexByte.
getHost returns the host part of a host : port . If no : is found it returns the original string . Note : This hand - rolled loop is faster than using strings . IndexByte .