https://github.com/atrox/env
a tiny .env wrapper
https://github.com/atrox/env
Last synced: 10 months ago
JSON representation
a tiny .env wrapper
- Host: GitHub
- URL: https://github.com/atrox/env
- Owner: Atrox
- License: mit
- Created: 2018-01-19T09:45:13.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-30T12:36:51.000Z (about 2 years ago)
- Last Synced: 2025-03-01T09:51:23.595Z (11 months ago)
- Language: Go
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ENV - a tiny .env wrapper
> this is probably not much to use to anybody else but feel free to do whatever you want with it
```go
import "go.atrox.dev/env"
```
### Notes:
- `.env` file is automatically loaded, if there is no `.env` file this wrapper does not care - no error is thrown
- `APP_ENV` must be set to the apps current environment (`development`/`staging`/`production`, ...)
- get environment variables with `Get(key)` and `GetDefault(key, default)`
- check if production with `IsProduction()` or development with `IsDevelopment()`