The provided golang app can be configured via a bridge.cfg file. I notice the app uses viper to get the config so in theory one can provide env properties to override the config in the file. Which would allow me to set the more secure data from the env rather than having to fuss about with a file after deployment. I just can't quite work out what the right env property names are. Anyone know how to do this?

  • I spent quite a few hours trying to update the build server to the v1.0.0 version of viper which correctly handles nested env replacements, but alas I'm not a golang guy and the recursive dependency changes broke the build bad enough I was out of my depth. – Paul Hill Feb 23 '18 at 6:08
  • for the record the solution looks like this is anyone knows how to wrangle golang dependencies. func run(cmd *cobra.Command, args []string) { viper.SetConfigFile(configFile) viper.SetConfigType("toml") replacer := strings.NewReplacer(".", "_") viper.SetEnvKeyReplacer(replacer) viper.SetEnvPrefix("STELLAR") viper.AutomaticEnv() – Paul Hill Feb 23 '18 at 6:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.