fix nil map

This commit is contained in:
Roy Olav Purser 2022-01-15 18:36:22 +01:00
parent fcb2552e73
commit 7b77ef35af
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -48,6 +48,9 @@ func NewConfig() *Config {
}
if unicode.IsLetter(getFirstRune(key)) {
if len(config.mapEnv[left]) == 0 {
config.mapEnv[left] = make(map[string]cEntry)
}
var entry cEntry
entry.value = splitted[1]
entry.dtype = TypeNone