code: func ForDisplay(given string) string {
  	var portPortion string
  	if colonPos := strings.Index(given, ":"); colonPos != -1 {
  		given, portPortion = given[:colonPos], given[colonPos:]
  	}
  	portPortion, _ = normalizePortPortion(portPortion)
  
  	ascii, err := displayProfile.ToASCII(given)
  	if err != nil {
  		return given + portPortion
  	}
  	display, err := displayProfile.ToUnicode(ascii)
  	if err != nil {
  		return given + portPortion
  	}
  	return display + portPortion
  }
docs: // ForDisplay takes a user-specified hostname and returns a normalized form of
  // it suitable for display in the UI.
  //
  // If the input is so invalid that no normalization can be performed then
  // this will return the input, assuming that the caller still wants to
  // display _something_. This function is, however, more tolerant than the
  // other functions in this package and will make a best effort to prepare
  // _any_ given hostname for display.
  //
  // For validation, use either IsValid (for explicit validation) or
  // ForComparison (which implicitly validates, returning an error if invalid).