forked from coop-cloud-mirrors/godotenv
Expand variables on parseValue
This commit is contained in:
parent
33977c2d8d
commit
50c29652a0
@ -291,6 +291,13 @@ func parseValue(value string, envMap map[string]string) string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// expand variables
|
||||||
|
value = os.Expand(value, func(key string) string {
|
||||||
|
if val, ok := envMap[key]; ok {
|
||||||
|
return val
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
})
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user