Skip to content
Snippets Groups Projects
Commit bde1f652 authored by flycash's avatar flycash
Browse files

Fix Review

parent f69f6026
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
......@@ -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)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment