re-add env parsing
This commit is contained in:
parent
83e70898dd
commit
d461fcd9ba
2
proxy.go
2
proxy.go
@ -97,6 +97,7 @@ func main() {
|
|||||||
// use .env file if it exists
|
// use .env file if it exists
|
||||||
if _, err := os.Stat(".env"); err == nil {
|
if _, err := os.Stat(".env"); err == nil {
|
||||||
if err := ff.Parse(flagset, os.Args[1:],
|
if err := ff.Parse(flagset, os.Args[1:],
|
||||||
|
ff.WithEnvVarPrefix(""),
|
||||||
ff.WithConfigFile(".env"),
|
ff.WithConfigFile(".env"),
|
||||||
ff.WithConfigFileParser(ff.EnvParser),
|
ff.WithConfigFileParser(ff.EnvParser),
|
||||||
); err != nil {
|
); err != nil {
|
||||||
@ -106,6 +107,7 @@ func main() {
|
|||||||
} else {
|
} else {
|
||||||
// use env variables and shelly-proxy.ini file
|
// use env variables and shelly-proxy.ini file
|
||||||
if err := ff.Parse(flagset, os.Args[1:],
|
if err := ff.Parse(flagset, os.Args[1:],
|
||||||
|
ff.WithEnvVarPrefix(""),
|
||||||
ff.WithConfigFileFlag("config"),
|
ff.WithConfigFileFlag("config"),
|
||||||
ff.WithConfigFileParser(IniParser),
|
ff.WithConfigFileParser(IniParser),
|
||||||
); err != nil {
|
); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user