add to map

This commit is contained in:
Roy Olav Purser 2021-03-24 12:00:54 +01:00
parent 614c6000c5
commit fc94e68073
No known key found for this signature in database
GPG Key ID: 0BA77797F072BC52

View File

@ -45,6 +45,7 @@ func (c *Config) Define(key string, dtype DataType) {
entry, ok := c.env[upper] entry, ok := c.env[upper]
if ok { if ok {
entry.dtype = dtype entry.dtype = dtype
c.env[upper] = entry
} else { } else {
var entry cEntry var entry cEntry
entry.dtype = dtype entry.dtype = dtype
@ -62,6 +63,7 @@ func (c *Config) DefineDefault(key string, val string, dtype DataType) {
entry.empty = false entry.empty = false
entry.value = val entry.value = val
entry.dtype = dtype entry.dtype = dtype
c.env[upper] = entry
} }
} else { } else {
var entry cEntry var entry cEntry