Make it compatible with the previous version.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2022-09-18 19:16:57 +01:00
parent 1c2e6e3da9
commit 6bdbf3b83d
5 changed files with 16 additions and 15 deletions

View File

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