Make configuration file optional
This commit is contained in:
parent
f8cf68af83
commit
0fd921ee28
@ -63,7 +63,7 @@ func main() {
|
|||||||
viper.AddConfigPath(".")
|
viper.AddConfigPath(".")
|
||||||
err = viper.ReadInConfig()
|
err = viper.ReadInConfig()
|
||||||
|
|
||||||
if err != nil {
|
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
|
||||||
log.Fatalf("fatal error config file: %v", err)
|
log.Fatalf("fatal error config file: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user