4a6b4a82a7
Signed-off-by: Odyssey <odyssey346@disroot.org>
20 lines
373 B
Go
20 lines
373 B
Go
package config
|
|
|
|
import (
|
|
"log"
|
|
"strconv"
|
|
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
func HCaptchaSiteKey() string {
|
|
viper.SetConfigName("config")
|
|
viper.AddConfigPath("./data")
|
|
err := viper.ReadInConfig()
|
|
if err != nil {
|
|
log.Println("Error reading config for getting hcaptcha.site_key", err.Error())
|
|
}
|
|
result := strconv.Itoa(viper.GetInt("hcaptcha.site_key"))
|
|
return result
|
|
}
|