add to map
This commit is contained in:
parent
614c6000c5
commit
fc94e68073
2
main.go
2
main.go
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user