func (port *Port) Write(buf []byte) error {
	n, err := unix.Write(port.fd, buf)
	if err != nil {
		return err
	}
	if n != len(buf) {
		return fmt.Errorf("wrote %d bytes instead of %d", n, len(buf))
	}
	return nil
}
// Write writes len(buf) bytes from buf to port.
Write writes len(buf) bytes from buf to port.
// Write writes len ( buf ) bytes from buf to port .
func (port *Port) Write(buf []byte) error {
	n, err := unix.Write(port.fd, buf)
	if err != nil {
		return err
	}
	if n != len(buf) {
		return fmt.Errorf("wrote %d bytes instead of %d", n, len(buf))
	}
	return nil
}
func ( port * Port ) Write ( buf [ ] byte ) error { n , err := unix . Write ( port . fd , buf ) if err != nil { return err } if n != len ( buf ) { return fmt . Errorf ( " " , n , len ( buf ) ) } return nil }
Write writes len(buf) bytes from buf to port.
Write writes len ( buf ) bytes from buf to port .