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

19 lines
344 B
Go
Raw Permalink Normal View History

2022-09-18 02:20:55 +05:30
package config
import (
"log"
"github.com/spf13/viper"
)
func OptAnn() string {
2022-09-18 02:20:55 +05:30
viper.SetConfigName("config")
viper.AddConfigPath("./data")
err := viper.ReadInConfig()
if err != nil {
log.Println("Error reading config. Error getting: options.announce", err.Error())
2022-09-18 02:20:55 +05:30
}
result := viper.GetString("options.announce")
2022-09-18 02:20:55 +05:30
return result
}