From 7c9a9f1a63980867c33c656bbc6536821a0c1b7c Mon Sep 17 00:00:00 2001 From: teisnp Date: Mon, 12 Feb 2024 21:05:39 +0100 Subject: [PATCH] added secret file loading if exists --- cmd/root.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index 3692997..e68bb80 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -74,6 +74,11 @@ func initConfig() { logrus.Info("Using config file: ", viper.ConfigFileUsed()) } + viper.SetConfigName("secrets") + if err := viper.MergeInConfig(); err == nil { + logrus.Info("Using secret file: ", viper.ConfigFileUsed()) + } + viper.AutomaticEnv() }