1
0
mirror of https://github.com/go-kratos/kratos.git synced 2024-12-26 20:54:38 +02:00

fix: contrib config nacos lint err (#1522)

* fix: contrib metrics datadog lint err

* fix: contrib config nacos lint err
This commit is contained in:
倒霉狐狸 2021-09-28 11:29:04 +08:00 committed by GitHub
parent 0aace47d08
commit 74e630c21a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -12,9 +12,9 @@ import (
type Option func(*options)
type options struct {
endpoint string
endpoint string // nolint:structcheck,unused
namespaceID string
namespaceID string // nolint:structcheck,unused
group string
dataID string
@ -80,12 +80,12 @@ func NewConfigSource(client config_client.IConfigClient, opts ...Option) config.
}
return &Config{client: client, opts: _options}
}
func (c *Config) Load() ([]*config.KeyValue, error) {
content, err := c.client.GetConfig(vo.ConfigParam{
DataId: c.opts.dataID,
Group: c.opts.group,
})
if err != nil {
return nil, err
}
@ -107,7 +107,6 @@ func (c *Config) Watch() (config.Watcher, error) {
if dataId == watcher.dataID && group == watcher.group {
watcher.content <- data
}
return
},
})
if err != nil {

View File

@ -1,4 +1,3 @@
./contrib/config/nacos
./contrib/config/apollo
./contrib/config/kubernetes
./contrib/registry/nacos