func charDevice(tty string) (string, error) {
	device := filepath.Join("/dev", tty)
	s, err := os.Stat(device)
	if err != nil {
		return device, err
	}
	m := os.ModeDevice | os.ModeCharDevice
	if s.Mode()&m != m {
		return device, NotCharDeviceError(device)
	}
	return device, nil
}
// charDevice returns the pathname for the given tty,
// after verifying it exists and is a character device.
charDevice returns the pathname for the given tty,
after verifying it exists and is a character device.
// charDevice returns the pathname for the given tty // after verifying it exists and is a character device .
func charDevice(tty string) (string, error) {
	device := filepath.Join("/dev", tty)
	s, err := os.Stat(device)
	if err != nil {
		return device, err
	}
	m := os.ModeDevice | os.ModeCharDevice
	if s.Mode()&m != m {
		return device, NotCharDeviceError(device)
	}
	return device, nil
}
func charDevice ( tty string ) ( string , error ) { device := filepath . Join ( " " , tty ) s , err := os . Stat ( device ) if err != nil { return device , err } m := os . ModeDevice | os . ModeCharDevice if s . Mode ( ) & m != m { return device , NotCharDeviceError ( device ) } return device , nil }
charDevice returns the pathname for the given tty,
after verifying it exists and is a character device.
charDevice returns the pathname for the given tty after verifying it exists and is a character device .