From cbfa4ca97e3f7c92e2418f1cdf08fe30c8984947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=B5=B7=E6=B6=9B?= Date: Mon, 11 Jan 2016 18:24:12 +0800 Subject: [PATCH] add func:GetConfig it returns v.config --- viper.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/viper.go b/viper.go index 389a58e..796c67e 100644 --- a/viper.go +++ b/viper.go @@ -449,6 +449,12 @@ func (v *Viper) SetTypeByDefaultValue(enable bool) { v.typeByDefValue = enable } +// GetConfig returns v.config +func GetConfig() map[string]interface{} { return v.GetConfig() } +func (v *Viper) GetConfig() map[string]interface{} { + return v.config +} + // Viper is essentially repository for configurations // Get can retrieve any value given the key to use // Get has the behavior of returning the value associated with the first