/go-module-envordef

envordef returns a value from environment or, if the environment variable does not exist, a defined default value.

Primary LanguageGozlib LicenseZlib

Go module envordef

envordef is a Go module that tries to read a value from environment. If the environment variable in question is found, its value is returned in the type requested. If not, a default value, passed as the second argument, is returned.

How to use the module

go get gitlab.com/rbrt-weiler/go-module-envordef (or update using the -u flag) the module and start coding.

API Documentation

The module is fully commented, so documentation is available on GoDoc.

Source

The original project is hosted at GitLab, with a copy over at GitHub for the folks over there.