Skip to content

Common storage configuration for Go. Used by projects like owid-go and swift-go to persist store settings.

License

Notifications You must be signed in to change notification settings

SWAN-community/config-go

Repository files navigation

Secured Web Addressability Network

Secured Web Addressability Network (SWAN) - Config Go

Common configuration for Go. Used by projects like owid-go and swift-go to retrieve settings at startup.

The environment variables are checked for values to override any values contained in the configuration file or that are absent from the configuration file. Field names in the configuration structure are converted from camel case to the popular upper case underscore separated environment variable key format. For example; the field name ServiceProvider in a structure will be read from the environment variable SERVICE_PROVIDER if present.

Structures used with the LoadConfig function should use the mapstructure identifier to identify fields to be read from configuration files. For example; the field ServiceProvider should be declared as follows.

ServiceProvider string `mapstructure:"serviceProvider"`

About

Common storage configuration for Go. Used by projects like owid-go and swift-go to persist store settings.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages