mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-27 20:59:42 +08:00
use env for flags wtih dot in name (#4415)
This commit is contained in:
parent
9f55c7c90e
commit
4131874fa8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user