From 712f3b65cff182ccb9dccf6b672208f979b7307a Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Sat, 15 Jan 2022 18:52:45 +0100 Subject: [PATCH] fix nil map --- envconf.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/envconf.go b/envconf.go index 3bb6abc..4697c83 100644 --- a/envconf.go +++ b/envconf.go @@ -84,8 +84,8 @@ func (c *Config) Define(key string, dtype DataType) { // Define the type of an environment variable. // Variables without a defined type will be ignored by Parse. func (c *Config) DefineMap(key string, dtype DataType) { - upper := strings.ToUpper(key) - entries, ok := c.mapEnv[upper] + key = cleanKey(key) + entries, ok := c.mapEnv[key] if ok { for mapKey, entry := range entries { entry.dtype = dtype