From 04afcae9edc598f5388e68280aca2aeb7851d697 Mon Sep 17 00:00:00 2001 From: Raffael Sahli Date: Tue, 13 Dec 2022 07:43:01 +0000 Subject: [PATCH] fix: enforce yaml config #63 --- cmd/root.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 0017cba0..a67ad564 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -161,10 +161,9 @@ func initConfig() { viper.AddConfigPath("/etc/mongodb_query_exporter") // Search config in home directory with name ".mongodb_query_exporter" (without extension). viper.AddConfigPath(usr.HomeDir + "/.mongodb_query_exporter") - //config file name without extension - // viper.SetConfigName("config") } + viper.SetConfigType("yaml") if err := viper.ReadInConfig(); err != nil { panic(err) }