load configs in different env
- define config files for different env in conf/
src
|--your prject
|--conf
|--test
config.toml
|--product
config.toml
|--stage
config.toml
- define environment in servers:
// for test env
RUN_MODE = "test"
// for product env
RUN_MODE = "product"
// for stage env
RUN_MODE = "stage"
- load config in code
cfg, err := config.LoadToml(c, "config.toml")
product/config.toml will be load on product env server
test/config.toml for test env server
stage/config.toml for stage env server