summaryrefslogtreecommitdiff
path: root/plugins/config
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-19 16:47:15 +0300
committerValery Piashchynski <[email protected]>2021-01-19 16:47:15 +0300
commit26f9d35e18ef79d79a5609c6c68f1b6ad38c7aed (patch)
treedd6224660ffd0dcefe2332807203ee1eaf6697b4 /plugins/config
parent75ebbaac89ce8ebc3ab8de47b16e137844cfcd8a (diff)
Uniform all errors operations
Add new ExecTTL event Update tests Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/config')
-rwxr-xr-xplugins/config/plugin.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/config/plugin.go b/plugins/config/plugin.go
index 9cecf9f9..ce2baa85 100755
--- a/plugins/config/plugin.go
+++ b/plugins/config/plugin.go
@@ -18,7 +18,7 @@ type Viper struct {
// Inits config provider.
func (v *Viper) Init() error {
- const op = errors.Op("viper plugin init")
+ const op = errors.Op("config_plugin_init")
v.viper = viper.New()
// If user provided []byte data with config, read it and ignore Path and Prefix
if v.ReadInCfg != nil && v.Type != "" {
@@ -56,7 +56,7 @@ func (v *Viper) Overwrite(values map[string]interface{}) error {
// UnmarshalKey reads configuration section into configuration object.
func (v *Viper) UnmarshalKey(name string, out interface{}) error {
- const op = errors.Op("unmarshal key")
+ const op = errors.Op("config_plugin_unmarshal_key")
err := v.viper.UnmarshalKey(name, &out)
if err != nil {
return errors.E(op, err)
@@ -65,7 +65,7 @@ func (v *Viper) UnmarshalKey(name string, out interface{}) error {
}
func (v *Viper) Unmarshal(out interface{}) error {
- const op = errors.Op("config unmarshal")
+ const op = errors.Op("config_plugin_unmarshal")
err := v.viper.Unmarshal(&out)
if err != nil {
return errors.E(op, err)