google / gousb

gousb provides low-level interface for accessing USB devices
Apache License 2.0
845 stars 124 forks source link

Updates for incompatibilities with Go tip #85

Closed zagrodzki closed 4 years ago

zagrodzki commented 4 years ago

Since go 1.15 new() on CGo structs is no longer supported:

./fakelibusb_test.go:101:87: libusbContext can't be allocated in Go; it is incomplete (or unallocatable) ./fakelibusb_test.go:131:10: libusbDevHandle can't be allocated in Go; it is incomplete (or unallocatable)

Use CGo malloc to obtain unique pointers.

zagrodzki commented 4 years ago

Appveyor build has been failing for a long time due to unrelated issues, fixing that in a separate pull request.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 79.171% when pulling c08e08200ffdf21e7d48ad2eaee325ad6ece86f4 on no-new-for-cgo-structs into e4c3f66a1571a02d7cae859fa0be08edcb940541 on master.