Read config file values from yaml

This commit is contained in:
2021-12-03 02:15:05 +01:00
parent 1105ce3ebd
commit 4dd55ccc78
+14
View File
@@ -0,0 +1,14 @@
package main
import (
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
)
func main() {
viper.SetConfigFile(viper.GetString("config"))
if err := viper.ReadInConfig(); err != nil {
logrus.Debugf("Skip invalid config file %s, %v", viper.ConfigFileUsed(), err)
}
}