Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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