karalabe / hid

Gopher Interface Devices (USB HID)
Other
263 stars 131 forks source link

Proposal: move directories libusb and hidapi below internal/ #37

Closed dolmen closed 2 years ago

dolmen commented 2 years ago

I propose to move directories libusb/ and hidapi/ below internal/.

This will allow to hide dummy Go packages that need to be introduced to allow vendoring (see #31).

I can do the work if this is accepted.

Note: this will impact #33, #34 (libusb, hidapi upgrade scripts).

dolmen commented 2 years ago

Dummy Go package are not the right solution because that would create Go packages with C files without cgo files, and go build doesn't like that.

31 is not a solution to the vendoring problem.

The right solution is to have all files needed for the build in the package directory (no subdirectory), so this requires to flatten/inline libraries libusb and hidapi.