-
Notifications
You must be signed in to change notification settings - Fork 175
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
Err is nil when filetype is unknown #43
Comments
kmanley
pushed a commit
to kmanley/filetype
that referenced
this issue
Feb 9, 2019
The error isn't populated if the filetype is unknown. In that case filetype.Unknown is returned and err==nil. An error is only returned if an error occurs. You're correct that this example is wrong though:
I submitted #59 to correct that |
Should be fixed now. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior:
We would expect
err != nil
, but this is not so.The documentation appears to contradict itself. In one example, we have:
Yet, in another example, we have:
I would expect the documentation to be consistent and the error to be populated if we have an unknown filetype.
The text was updated successfully, but these errors were encountered: