From 590b2378b387d800b76946b741bc7c490838282e Mon Sep 17 00:00:00 2001 From: Victor Ruiz Date: Thu, 18 Feb 2016 19:30:45 +0100 Subject: [PATCH] replace '.' with '_' in environment variables --- flag.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flag.go b/flag.go index 151cae1..5bbaafb 100644 --- a/flag.go +++ b/flag.go @@ -860,7 +860,8 @@ func (f *FlagSet) ParseEnv(environ []string) error { envKey = f.envPrefix + "_" + envKey } envKey = strings.Replace(envKey, "-", "_", -1) - + envKey = strings.Replace(envKey, ".", "_", -1) + value, isSet := env[envKey] if !isSet { continue