diff --git a/godotenv.go b/godotenv.go index b505f51..19751d7 100644 --- a/godotenv.go +++ b/godotenv.go @@ -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 }