I have several projects on the hop at the moment which require control over a serial port, actually a serial port emulated over USB. So for the last few days I’ve let myself be distracted by writing yet another serial package for Go.
term
is built on a lower level package, called termios
which provides access to the POSIX terimos(3)
functions for fine grained control of the serial and terminal settings. As termios
mirrors the POSIX interface, it should be reasonably portable. Anything which differs, such as supported baud rates, can be papered over in the higher level term
package.
term
and termios
have been tested on Linux and OS X, and should work for the other BSDs.
Suggestions for additional features via issue or pull request are most welcome.