A Go (golang) port of the Ruby dotenv project (which loads env vars from a .env file). Storing configuration in the environment is one of the tenets of a twelve-factor app. Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables. But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. Dotenv load variables from a .env file into ENV when the environment is bootstrapped. It can be used as a library (for loading in env for your own daemons etc) or as a bin command. There is test coverage and CI for both linuxish and windows environments, but I make no guarantees about the bin version working on windows. Existing envs take precedence of envs that are loaded later.

Features

  • Existing envs take precedence of envs that are loaded later
  • Godotenv can also write a map representing the environment to a correctly-formatted and escaped file
  • Supports Linux and Windows
  • It can be used as a library
  • It can be used as a bin command
  • There is test coverage and CI for both linuxish and windows environments

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow GoDotEnv

GoDotEnv Web Site

Other Useful Business Software
$300 in Free Credit for Your Google Cloud Projects Icon
$300 in Free Credit for Your Google Cloud Projects

Build, test, and explore on Google Cloud with $300 in free credit. No hidden charges. No surprise bills.

Launch your next project with $300 in free Google Cloud credit—no hidden charges. Test, build, and deploy without risk. Use your credit across the Google Cloud platform to find what works best for your needs. After your credits are used, continue building with free monthly usage products. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of GoDotEnv!

Additional Project Details

Operating Systems

Linux, Windows

Programming Language

Go

Related Categories

Go Desktop Environment Software, Go Libraries

Registered

2021-12-17