Skip to content

Commit 53cc493

Browse files
authored
Merge pull request #81 from raffis/issue-63
fix: enforce yaml config #63
2 parents b361fd9 + 04afcae commit 53cc493

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmd/root.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,9 @@ func initConfig() {
160160
viper.AddConfigPath("/etc/mongodb_query_exporter")
161161
// Search config in home directory with name ".mongodb_query_exporter" (without extension).
162162
viper.AddConfigPath(usr.HomeDir + "/.mongodb_query_exporter")
163-
//config file name without extension
164-
// viper.SetConfigName("config")
165163
}
166164

165+
viper.SetConfigType("yaml")
167166
if err := viper.ReadInConfig(); err != nil {
168167
panic(err)
169168
}

0 commit comments

Comments
 (0)