Go bindings for the libusb C library.
$ go get github.com/gotmc/libusb/v2
To use libusb package, you'll need to install the libusb C library first.
$ brew install libusb
Download and install the latest Windows libusb binaries from libusb.info.
$ sudo apt-get install -y libusb-dev libusb-1.0-0-dev
Documentation can be found at either:
- https://godoc.org/github.com/gotmc/libusb
- http://localhost:6060/pkg/github.com/gotmc/libusb/ after running
$ godoc -http=:6060
Contributions are welcome! To contribute please:
- Fork the repository
- Create a feature branch
- Code
- Submit a pull request
Prior to submitting a pull request, please run:
$ make check
$ make lint
To update and view the test coverage report:
$ make cover
There are other USB Go libraries besides libusb. Below are a few alternatives:
- google/gousb — Wraps the libusb C library to provde Go-bindings. This library supersedes kylelemons/gousb, which is not archived. Apachage-2.0 license.
- karalabe/usb — Does not require the libusb C library to be installed. Written in C to be a cross platform, fully self-contained library for accessing and communicating with USB devices either via HID or low level interrupts. LGPL-3.0 license.
- deadsy/libusb — Wraps the libusb C library. MIT license.
libusb is released under the MIT license. Please see the LICENSE.txt file for more information.