summaryrefslogtreecommitdiff
path: root/plugins/config/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/config/plugin.go')
-rwxr-xr-xplugins/config/plugin.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/config/plugin.go b/plugins/config/plugin.go
index 1a170448..9cecf9f9 100755
--- a/plugins/config/plugin.go
+++ b/plugins/config/plugin.go
@@ -64,6 +64,15 @@ func (v *Viper) UnmarshalKey(name string, out interface{}) error {
return nil
}
+func (v *Viper) Unmarshal(out interface{}) error {
+ const op = errors.Op("config unmarshal")
+ err := v.viper.Unmarshal(&out)
+ if err != nil {
+ return errors.E(op, err)
+ }
+ return nil
+}
+
// Get raw config in a form of config section.
func (v *Viper) Get(name string) interface{} {
return v.viper.Get(name)