Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mdlayher opened this issue Sep 2, 2017 · 2 comments
Closed

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

mdlayher opened this issue Sep 2, 2017 · 2 comments

Comments

@mdlayher
Copy link

mdlayher commented Sep 2, 2017

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
Copy link
Owner

karalabe commented Nov 9, 2017

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
Copy link
Owner

karalabe commented Nov 9, 2017

Fixed via b77c67b.

@karalabe karalabe closed this as completed Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants