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