Comments (3)
@runeimp I'm not sure what you mean by a reset, would this be a function to read an env file and unset any vars defined in it? You can implement this on your side with something like:
env, _ := gotenv.Read(".env")
// do stuff with env and then reset....
for var := range env {
os.Unsetenv(var)
}
The library itself doesn't keep track of the variables it was used for setting, you can also use os.Clearenv()
to unset all the env vars within your program, but that could have some side effects, like for example, it would also unset $PATH
....
@autocorrectoff yes, check the fixtures
folder for some examples, but that question seems unrelated to the original issue...
from gotenv.
BTW, I'd also be happy to send a Pull Request if you would like me to take a crack at it for you. 😀
from gotenv.
@subosito Can we put comments in the .env file?
from gotenv.
Related Issues (13)
- Unclear specification in Usage instructions HOT 1
- equal sign (=) character support HOT 1
- Ignore missing files and options HOT 1
- Documentation incorrect for return values of StrictParse HOT 1
- bug: eliminating any combinations of `$1` or `$2` from any environment variables on retrieve. HOT 1
- Unexpected behaviour when referencing variables
- multiline ENV variable? HOT 3
- OverLoad: local variables do not override environment variables
- Compatibility workspace HOT 2
- StrictParse ignores scanner.Scan errors HOT 1
- UTF16-LE files can't be parsed
- 1.5.0 Breaks spf13/viper HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotenv.