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

any way to get only values in the dotenv file? #70

Open
amitavaghosh1 opened this issue Aug 13, 2021 · 1 comment
Open

any way to get only values in the dotenv file? #70

amitavaghosh1 opened this issue Aug 13, 2021 · 1 comment

Comments

@amitavaghosh1
Copy link

More of a help question.

Is there any way to get only the key, values in the .env file? right now, in the examples one has to go over all std env vars. which is not great I suppose.
The only way I see is to keep a track of the list of keys in .env separately in a Vector in the code

@daboross
Copy link
Contributor

This is possible with the dotenv::dotenv_iter method. It seems to be deprecated now, but that's why it existed before, at least: so you can get dotenv vars without loading them into std env nor iterating over non-dotenv env vars.

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