fix: check error on read config

fixes #36
This commit is contained in:
Jordan Knott 2020-08-19 00:34:27 -05:00 committed by GitHub
parent 83765077ff
commit db9c7408ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,8 @@ func initConfig() {
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.AutomaticEnv()
if err := viper.ReadInConfig(); err != nil {
err := viper.ReadInConfig()
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
panic(err)
}
}