Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Replace '-' with '_' for Env
Browse files Browse the repository at this point in the history
Replace hyphen with undersore for environment variables so things like "url-open" can be set in environment.
  • Loading branch information
meimeil committed Sep 23, 2019
1 parent de609ae commit e4e764e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func main() {
viper.SetDefault("general.env-var-prefix", "burrow")
envPrefix := viper.GetString("general.env-var-prefix")
viper.SetEnvPrefix(envPrefix)
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_"))
viper.AutomaticEnv()

// Create the PID file to lock out other processes
Expand Down

0 comments on commit e4e764e

Please sign in to comment.