zeromicro / go-zero

A cloud-native Go microservices framework with cli tool for productivity.
https://go-zero.dev
MIT License
28.84k stars 3.91k forks source link

Multi-environment configuration merge support #3186

Closed greper closed 1 month ago

greper commented 1 year ago

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.

kevwan commented 1 year ago

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

github-actions[bot] commented 4 months ago

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

github-actions[bot] commented 1 month ago

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