erste Server Implementierung zum test

This commit is contained in:
2026-07-25 10:01:41 +02:00
parent 7573654949
commit da4535ef1f
6 changed files with 249 additions and 0 deletions
@@ -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
}