Open amitavaghosh1 opened 3 years ago
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.
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