mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 04:03:35 +08:00
use env for flags wtih dot in name (#4415)
This commit is contained in:
@@ -1059,11 +1059,13 @@ func (f *FlagSet) ParseEnv(environ []string) error {
|
||||
}
|
||||
|
||||
envKey := strings.ToUpper(flag.Name)
|
||||
|
||||
if f.envPrefix != "" {
|
||||
envKey = f.envPrefix + "_" + envKey
|
||||
}
|
||||
envKey = strings.Replace(envKey, "-", "_", -1)
|
||||
|
||||
envKey = strings.Replace(envKey, ".", "_", -1)
|
||||
|
||||
value, isSet := env[envKey]
|
||||
if !isSet {
|
||||
continue
|
||||
|
Reference in New Issue
Block a user