env

  • Framework configurations all useasjardas a prefix

  • Different hierarchical configuration levels are separated by_separator, for exampleasjard_app, the application usesasjard.appto read

  • Case sensitive, for exampleasjard_appandasjard_APPare two different configurations

// Configure the following in environment variables
// export asjard_app=asjard
// In the program you can read like this
config.GetString("asjard.app", "")
// Output: asjard
//
// Custom configuration
// export CUSTOME_ENV=custome_value
config.GetString("CUSTOME.ENV", "")
// Output: custome_value

Last updated