-
Notifications
You must be signed in to change notification settings - Fork 45
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
remove unnecessary ok on dotenv result #38
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR!
We could do with both the .ok()
and .unwrap()
/?
versions being present in the readme. It is often the first example a user will see, and most would not want their program to panic/throw if there is no .env file. It is supposed to be an optional way of passing environment variables into a program.
Instead of changing the existing example, we should have both, and a decription of which to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes
@sonro Wouldn't it be best to make examples use proper error handling instead? This will help beginners find into best practices asap. |
I completely agree. This PR along with previous issues regarding this topic has led to a discussion about an API change (#39). Once that has been resolved more documentation (including examples) will surely follow. |
fixes #37
Hope I've done this correctly🥲