From 74e630c21a5bd8c7e28d893131f5df5e21470ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=92=E9=9C=89=E7=8B=90=E7=8B=B8?= Date: Tue, 28 Sep 2021 11:29:04 +0800 Subject: [PATCH] fix: contrib config nacos lint err (#1522) * fix: contrib metrics datadog lint err * fix: contrib config nacos lint err --- contrib/config/nacos/config.go | 7 +++---- hack/.lintcheck_failures | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/contrib/config/nacos/config.go b/contrib/config/nacos/config.go index 60019e8e0..3d5cbf4b1 100644 --- a/contrib/config/nacos/config.go +++ b/contrib/config/nacos/config.go @@ -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 { diff --git a/hack/.lintcheck_failures b/hack/.lintcheck_failures index 2cfe406c4..ca4f7a741 100644 --- a/hack/.lintcheck_failures +++ b/hack/.lintcheck_failures @@ -1,4 +1,3 @@ -./contrib/config/nacos ./contrib/config/apollo ./contrib/config/kubernetes ./contrib/registry/nacos