feat: refactor go.mod.

This commit is contained in:
tx7do
2024-11-14 15:47:21 +08:00
parent f3d17b9d34
commit 120029bb01
16 changed files with 675 additions and 175 deletions

View File

@@ -22,6 +22,10 @@ func getConfigKey(configKey string, useBackslash bool) string {
// NewConfigSource 创建一个远程配置源 - Consul
func NewConfigSource(c *conf.RemoteConfig) config.Source {
if c == nil || c.Consul == nil {
return nil
}
cfg := consulApi.DefaultConfig()
cfg.Address = c.Consul.Address
cfg.Scheme = c.Consul.Scheme