make sure we can pull config from env variables.

This commit is contained in:
Jason Kulatunga
2022-04-29 16:28:50 -07:00
parent 7cd828ef0d
commit 00bc6ecd92
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -6,6 +6,7 @@ import (
"github.com/spf13/viper"
"log"
"os"
"strings"
)
// When initializing this class the following methods must be called:
@@ -64,6 +65,11 @@ func (c *configuration) Init() error {
//c.SetConfigName("drawbridge")
//c.AddConfigPath("$HOME/")
//configure env variable parsing.
c.SetEnvPrefix("SCRUTINY")
c.SetEnvKeyReplacer(strings.NewReplacer("-", "_", ".", "_"))
c.AutomaticEnv()
//CLI options will be added via the `Set()` function
return nil
}