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/optionannounce.go
Midou36O 6bdbf3b83d
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Make it compatible with the previous version.
2022-09-18 19:16:57 +01:00

19 lines
344 B
Go

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