diff options
Diffstat (limited to 'plugins/config')
-rwxr-xr-x | plugins/config/provider.go | 2 | ||||
-rwxr-xr-x | plugins/config/viper.go | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/config/provider.go b/plugins/config/provider.go index 580231fd..ac33b3de 100755 --- a/plugins/config/provider.go +++ b/plugins/config/provider.go @@ -1,7 +1,7 @@ package config type Provider interface { - // Unmarshal configuration section into configuration object. + // UnmarshalKey reads configuration section into configuration object. // // func (h *HttpService) Init(cp config.Provider) error { // h.config := &HttpConfig{} diff --git a/plugins/config/viper.go b/plugins/config/viper.go index 0c34313c..4e85af6b 100755 --- a/plugins/config/viper.go +++ b/plugins/config/viper.go @@ -14,6 +14,7 @@ type ViperProvider struct { Prefix string } +// Inits config provider. func (v *ViperProvider) Init() error { v.viper = viper.New() @@ -49,7 +50,7 @@ func (v *ViperProvider) Overwrite(values map[string]string) error { return nil } -// +// UnmarshalKey reads configuration section into configuration object. func (v *ViperProvider) UnmarshalKey(name string, out interface{}) error { err := v.viper.UnmarshalKey(name, &out) if err != nil { |