1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-25 21:38:59 +02:00

Merge pull request #366 from yuanfeng0905/fix-fixconfig

fix: fixconfig
This commit is contained in:
Tony 2019-09-30 16:25:40 +08:00 committed by GitHub
commit 85a67908bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,7 @@ type appInfo struct {
}
func fixConfig(c *Config) error {
if len(c.Nodes) == 0 {
if len(c.Nodes) == 0 && env.DiscoveryNodes != "" {
c.Nodes = strings.Split(env.DiscoveryNodes, ",")
}
if c.Region == "" {