Initial work
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2022-09-17 21:50:55 +01:00
parent c5b3c2bd98
commit dc69cc447d
6 changed files with 62 additions and 2 deletions

18
config/optionform.go Normal file
View File

@ -0,0 +1,18 @@
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 for getting options.announce", err.Error())
}
result := viper.GetString("options.announce")
return result
}