Package envconfig implements decoding of environment variables based on a user-defined specification. Typical use is using environment variables for configuration settings. Envconfig supports the use of struct tags to specify alternate, default, and required environment variables. Envconfig won't process a field with the "ignored" tag set to "true", even if a corresponding environment variable is set. Any field whose type (or pointer-to-type) implements envconfig.Decoder can control its own deserialization. Also, envconfig will use a Set(string) error method like from the flag.Value interface if implemented.
Features
- Set some environment variables
- Supports the use of struct tags
- Specify alternate, default, and required environment variables
- Envconfig has automatic support for CamelCased struct elements
- Envconfig supports slices of any supported type
- Envconfig supports maps (keys and values of any supported type)
Categories
LibrariesLicense
MIT LicenseFollow envconfig
Other Useful Business Software
MongoDB Atlas runs apps anywhere
MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of envconfig!