diff --git a/envconf.go b/envconf.go index 813ff7d..61ae76c 100644 --- a/envconf.go +++ b/envconf.go @@ -55,7 +55,6 @@ func NewConfig() *Config { if len(config.mapEnv[left]) == 0 { config.mapEnv[left] = make(map[string]string) } - fmt.Printf("left=(%s), right=(%s), key=(%s)\n", left, right, key) config.mapEnv[left][right] = key } } @@ -86,11 +85,9 @@ func (c *Config) Define(key string, dtype DataType) { // Variables without a defined type will be ignored by Parse. func (c *Config) DefineMap(key string, dtype DataType) { key = cleanKey(key) - fmt.Println(c.mapEnv) entries, ok := c.mapEnv[key] if ok { for _, key = range entries { - fmt.Printf("key-from-define-map (%s)\n", key) entry := c.env[key] entry.dtype = dtype c.env[key] = entry diff --git a/tests/main.go b/tests/main.go index 1fae9da..a7d4254 100644 --- a/tests/main.go +++ b/tests/main.go @@ -8,7 +8,7 @@ import ( func main() { conf := envconf.NewConfig() conf.Define("this_is_a_map", envconf.TypeInt) - conf.Define("test_map", envconf.TypeInt) + conf.DefineMap("test_map", envconf.TypeInt) conf.Parse() conf.Status()