Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/locona/envdef
envdef provides methods of setting environment value with default value
https://github.com/locona/envdef
envdef envdiff environment
Last synced: 10 days ago
JSON representation
envdef provides methods of setting environment value with default value
- Host: GitHub
- URL: https://github.com/locona/envdef
- Owner: locona
- Created: 2020-03-12T12:52:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-26T21:42:59.000Z (about 1 month ago)
- Last Synced: 2024-10-07T03:42:17.660Z (about 1 month ago)
- Topics: envdef, envdiff, environment
- Language: Go
- Homepage:
- Size: 232 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# EnvDef
envdef provides methods of setting environment value with default value.
## Installation
As a library
```
go get github.com/locona/envdef
```or if you want to use it as a bin command
```
go get github.com/locona/envdef/cmd/envdef
```## Usage
Add your application configuration to your `.env` file in the root of your project:
```
S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHERE
```and `.env.sample` file in the root of your project:
```
S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHERE
REGION=REGION
```And then run:
```
envdef
```As a result created the `.env.new` file
```
REGION=REGION
S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHERE
```testtest