Make it compatible with the previous version.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user