We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ff2461a + 08eed61 commit 2a1e459Copy full SHA for 2a1e459
1 file changed
config/config.go
@@ -10,7 +10,7 @@ import (
10
"github.com/spf13/viper"
11
)
12
13
-var configPath = flag.String("config", "config.yml", "path to the config file ")
+var configPath = flag.String("config", "", "path to the config file")
14
var printVersion = flag.Bool("version", false, "prints version")
15
16
func init() {
@@ -71,7 +71,7 @@ func GetConfig() (*Config, error) {
71
viper.SetConfigType("yaml")
72
viper.AddConfigPath(".")
73
74
- if configPath != nil {
+ if *configPath != "" {
75
log.Printf("Using config: %s", *configPath)
76
viper.SetConfigFile(*configPath)
77
}
0 commit comments