This repository has been archived on 2022-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
Segfautils/config/webhook.go
Odyssey f6e5674b63 My changes
Signed-off-by: Odyssey <odyssey346@disroot.org>
2022-10-18 15:26:47 +02:00

19 lines
363 B
Go

package config
import (
"log"
"github.com/spf13/viper"
)
func ShoutrrrURL() string {
viper.SetConfigName("config")
viper.AddConfigPath("./data")
err := viper.ReadInConfig()
if err != nil {
log.Println("Error reading config. Error getting: segfautils.shoutrrr_url", err.Error())
}
result := viper.GetString("segfautils.shoutrrr_url")
return result
}