code: func tty(writer io.Writer) bool {
  	if v, ok := writer.(hasFd); ok {
  		return isatty.IsTerminal(v.Fd()) || isatty.IsCygwinTerminal(v.Fd())
  	}
  	return false
  }
docs: // tty returns true if the writer is connected to a tty