diff --git a/config_center/apollo/impl.go b/config_center/apollo/impl.go index 1df3bedded5aa949ce21921b0edaf6931f8a1d6b..bc8538f2e745874f357d6444704cb7e9c3711ef5 100644 --- a/config_center/apollo/impl.go +++ b/config_center/apollo/impl.go @@ -25,7 +25,7 @@ import ( ) import ( - "github.com/pkg/errors" + perrors "github.com/pkg/errors" "github.com/zouyx/agollo" ) @@ -119,7 +119,7 @@ func getNamespaceName(namespace string, configFileFormat agollo.ConfigFileFormat func (c *apolloConfiguration) GetInternalProperty(key string, opts ...cc.Option) (string, error) { config := agollo.GetConfig(c.appConf.NamespaceName) if config == nil { - return "", errors.New(fmt.Sprintf("nothing in namespace:%s ", key)) + return "", perrors.New(fmt.Sprintf("nothing in namespace:%s ", key)) } return config.GetStringValue(key, ""), nil } @@ -130,7 +130,7 @@ func (c *apolloConfiguration) GetRule(key string, opts ...cc.Option) (string, er // PublishConfig will publish the config with the (key, group, value) pair func (c *apolloConfiguration) PublishConfig(string, string, string) error { - return errors.New("unsupport operation") + return perrors.New("unsupport operation") } func (c *apolloConfiguration) GetProperties(key string, opts ...cc.Option) (string, error) { @@ -140,7 +140,7 @@ func (c *apolloConfiguration) GetProperties(key string, opts ...cc.Option) (stri */ config := agollo.GetConfig(key) if config == nil { - return "", errors.New(fmt.Sprintf("nothing in namespace:%s ", key)) + return "", perrors.New(fmt.Sprintf("nothing in namespace:%s ", key)) } return config.GetContent(agollo.Properties), nil } diff --git a/config_center/nacos/listener.go b/config_center/nacos/listener.go index 1d63facbe39373a3f3ccbd66a790b5b4e0894693..de74cff8f64683a47278825b670352a04b69b791 100644 --- a/config_center/nacos/listener.go +++ b/config_center/nacos/listener.go @@ -46,7 +46,7 @@ func (n *nacosDynamicConfiguration) addListener(key string, listener config_cent go callback(listener, namespace, group, dataId, data) }, }) - logger.Errorf("n : listen config fail, error:%v ", err) + logger.Errorf("nacos : listen config fail, error:%v ", err) newListener := make(map[config_center.ConfigurationListener]context.CancelFunc) newListener[listener] = cancel n.keyListeners.Store(key, newListener)