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/hcaptchasecretkey.go

20 lines
379 B
Go
Raw Normal View History

package config
import (
"log"
"strconv"
"github.com/spf13/viper"
)
func HCaptchaSecretKey() string {
viper.SetConfigName("config")
viper.AddConfigPath("./data")
err := viper.ReadInConfig()
if err != nil {
log.Println("Error reading config for getting hcaptcha.secret_key", err.Error())
}
result := strconv.Itoa(viper.GetInt("hcaptcha.secret_key"))
return result
}