Jan 9, 2023
You might also consider taking a look at the godotenv package and the spf3/viper along with the spf13/pflag packages. I personally prefer the viper+pflag combo because it can be configured to read from command-line, environment file, or environment, bases on that order of precedence.