karalabe / hid

Gopher Interface Devices (USB HID)
Other
266 stars 132 forks source link

Device's Close method should implement io.Closer #6

Closed mdlayher closed 7 years ago

mdlayher commented 7 years ago

Hello! I'm using hid in an upcoming project, and noticed that Device.Close has no return value. Since almost all Close functions in Go return an error, would it be acceptable to add an error return value to this method as well?

This would enable *hid.Device to easily implement io.Closer and io.ReadWriteCloser, and ensure that if any error return value is needed in the future, it can be easily adjusted.

Let me know what you think, and thank you for this package.

karalabe commented 7 years ago

Seems reasonable! :) Sorry, for not replying, I stopped looking at github notifications due to the crazy amounts I get and didn't see your comment. Will updated the repo with this change.

karalabe commented 7 years ago

Fixed via https://github.com/karalabe/hid/commit/b77c67bf182314df00ff3f4b34a5fec3c13a8307.