go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

Multi-environment configuration merge support

Open greper opened this issue 2 years ago • 2 comments
trafficstars

Describe the solution you'd like First , I know go run app.go-f etc/app.yaml can switch config

But I don't want to copy all the configuration in app-prod.yaml

I want to configure only the parts that must be modified in app-prod.yaml and inherit the rest from app.yaml

configs := []*configFiles
conf.MustLoad(configFiles, &c, conf.UseEnv())

We can use loader to load multiple configuration files as json, and then combine the previous configuration with the later configuration, and finally convert into a config struct

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

greper avatar Apr 29 '23 14:04 greper

The core team will have a discussion on this. Thanks for your ideas!

kevwan avatar Apr 30 '23 03:04 kevwan

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar May 05 '24 01:05 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Aug 07 '24 01:08 github-actions[bot]