mirror of
https://github.com/joho/godotenv.git
synced 2025-09-08 05:22:39 +00:00
Expand variables on parseValue
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user