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 dc69cc447d
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Initial work
2022-09-17 21:50:55 +01:00

19 lines
333 B
Go

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