in cmd/psa-checker/root.go [87:114]
func initConfig() {
if cfgFile != "" {
// Use config file from the flag.
viper.SetConfigFile(cfgFile)
} else {
// Find home directory.
// home, err := os.UserHomeDir()
// cobra.CheckErr(err)
// // Search config in home directory with name ".starter-go" (without extension).
// viper.AddConfigPath(home)
// viper.SetConfigType("yaml")
// viper.SetConfigName(".starter-go")
// Search current folder for config.yaml
viper.AddConfigPath("./")
viper.SetConfigType("yaml")
viper.SetConfigName("config")
}
viper.AutomaticEnv() // read in environment variables that match
// If a config file is found, read it in.
if err := viper.ReadInConfig(); err == nil {
fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed())
}
}