code: func shortHostname(hostname string) string {
  	if i := strings.Index(hostname, "."); i >= 0 {
  		return hostname[:i]
  	}
  	return hostname
  }
docs: // shortHostname returns its argument, truncating at the first period.
  // For instance, given "www.google.com" it returns "www".