Value Services implementiert Teil 1

This commit is contained in:
2026-08-15 16:58:12 +02:00
parent 8c5ad6ceec
commit 58de339be8
7778 changed files with 868356 additions and 124 deletions
+19
View File
@@ -0,0 +1,19 @@
package config
import (
"log"
"github.com/spf13/viper"
)
func InitConfig(fileName string) *viper.Viper {
config := viper.New()
config.SetConfigName(fileName)
config.AddConfigPath(".")
config.AddConfigPath("$HOME")
err := config.ReadInConfig()
if err != nil {
log.Fatal("Error while parsing configuration file! ", err)
}
return config
}