diff --git a/envconf.go b/envconf.go index d225e53..6b101d9 100644 --- a/envconf.go +++ b/envconf.go @@ -60,11 +60,11 @@ func (c *Config) DefineDefault(key string, val string, dtype DataType) { entry, ok := c.env[upper] if ok { if entry.unset { - entry.empty = false entry.value = val - entry.dtype = dtype - c.env[upper] = entry } + entry.dtype = dtype + entry.empty = false + c.env[upper] = entry } else { var entry cEntry entry.dtype = dtype