remove empty map

This commit is contained in:
Roy Olav Purser 2022-03-27 15:03:39 +02:00
parent 19fdcd7e05
commit 6fea990cb9
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -79,7 +79,7 @@ func NewConfig() *Config {
lmiddle := splitted[count] lmiddle := splitted[count]
rmiddle := splitted[count+1] rmiddle := splitted[count+1]
right = strings.Trim(strings.Join(splitted[count+2:], "_"), "_") right = strings.Trim(strings.Join(splitted[count+2:], "_"), "_")
if len(config.mapMapEnv[left][lmiddle][rmiddle]) == 0 { if len(config.mapMapMapEnv[left][lmiddle][rmiddle]) == 0 {
config.mapMapMapEnv[left][lmiddle][rmiddle] = make(map[string]string) config.mapMapMapEnv[left][lmiddle][rmiddle] = make(map[string]string)
} }
if left != "" && lmiddle != "" && rmiddle != "" && right != "" { if left != "" && lmiddle != "" && rmiddle != "" && right != "" {