Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Log errors instead of failing in some cases #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maitredede
Copy link

In some cases, a ioctl error should not block the full function since it is an normal behavior (for example, something not supported by the device).

@zonque
Copy link

zonque commented Mar 30, 2020

Libraries in packages such as this one should never log themselves, as that clashes with the logging in place of the application using them. If you want to augment the error to give more context (which totally makes sense), use fmt.Errorf() or wrap the error as described here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants