706aeb0d0f
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
20 lines
322 B
Go
20 lines
322 B
Go
package settings
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
func Load(configPath string) {
|
|
viper.SetConfigName("config.yaml")
|
|
viper.SetConfigType("yaml")
|
|
viper.AddConfigPath(configPath)
|
|
|
|
err := viper.ReadInConfig()
|
|
|
|
if err != nil {
|
|
panic(fmt.Errorf("Fatal error while reading config file: %w \n", err))
|
|
}
|
|
}
|