repositorypackage
0.3.1
Repository: https://github.com/mikluko/envflagset.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
envflagset
A simple golang tool to set flag via environment variables inspired by Go: Best Practices for Production Environments
Features
- Set flag via environment variables.
- Auto mapping environment variables to flag. (e.g.
DATABASE_PORT
to-database-port
) - Customizable env - flag mapping support.
- Min length (default is 3) support in order to avoid parsing short flag.
- Show environment variable key in usage (-h).
Basic Usage
Just keep it SIMPLE and SIMPLE and SIMPLE!
Use envflagset.Parse()
instead of flag.Parse()
.
See example
folder for complete examples.