func FindUSB(vendor, product int) (string, error) {
	device, err := findUSBDevice(vendor, product)
	if err != nil {
		return device, err
	}
	tty := ""
	err = filepath.Walk(device, func(path string, info os.FileInfo, err error) error {
		if tty != "" {
			return filepath.SkipDir
		}
		if err != nil {
			return err
		}
		dir, file := filepath.Split(path)
		if filepath.Base(dir) == "tty" && strings.HasPrefix(file, "tty") {
			tty = file
			return filepath.SkipDir
		}
		return nil
	})
	if err != nil && err != filepath.SkipDir {
		return "", err
	}
	if tty == "" {
		return "", TTYNotFoundError(device)
	}
	return charDevice(tty)
}
// FindUSB returns the /dev/tty* path corresponding to the USB serial device
// with the given vendor and product identifiers.
FindUSB returns the /dev/tty* path corresponding to the USB serial device
with the given vendor and product identifiers.
// FindUSB returns the / dev / tty * path corresponding to the USB serial device // with the given vendor and product identifiers .
func FindUSB(vendor, product int) (string, error) {
	device, err := findUSBDevice(vendor, product)
	if err != nil {
		return device, err
	}
	tty := ""
	err = filepath.Walk(device, func(path string, info os.FileInfo, err error) error {
		if tty != "" {
			return filepath.SkipDir
		}
		if err != nil {
			return err
		}
		dir, file := filepath.Split(path)
		if filepath.Base(dir) == "tty" && strings.HasPrefix(file, "tty") {
			tty = file
			return filepath.SkipDir
		}
		return nil
	})
	if err != nil && err != filepath.SkipDir {
		return "", err
	}
	if tty == "" {
		return "", TTYNotFoundError(device)
	}
	return charDevice(tty)
}
func FindUSB ( vendor , product int ) ( string , error ) { device , err := findUSBDevice ( vendor , product ) if err != nil { return device , err } tty := " " err = filepath . Walk ( device , func ( path string , info os . FileInfo , err error ) error { if tty != " " { return filepath . SkipDir } if err != nil { return err } dir , file := filepath . Split ( path ) if filepath . Base ( dir ) == " " && strings . HasPrefix ( file , " " ) { tty = file return filepath . SkipDir } return nil } ) if err != nil && err != filepath . SkipDir { return " " , err } if tty == " " { return " " , TTYNotFoundError ( device ) } return charDevice ( tty ) }
FindUSB returns the /dev/tty* path corresponding to the USB serial device
with the given vendor and product identifiers.
FindUSB returns the / dev / tty * path corresponding to the USB serial device with the given vendor and product identifiers .