Sometimes I use a private key,
Separate .env.sample
file for sample and .env
file for development
I want to manage .env
with this as positive in order to leave .env.sample
in the commit
go get github.com/locona/envdef/cmd/envdef
Add the application configuration to the .env file at the root of your project.
S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHERE
The .env.sample
file at the root of the project
S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHERE
REGION=REGION
Then run
envdef
The result is a .env.new
file
REGION=REGION
S3_BUCKET=YOURS3BUCKET
SECRET_KEY=YOURSECRETKEYGOESHERE
The console also shows the changes
Using envdef makes it easier to manage environment variables that are no longer needed or added.