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/oauthclientsecret.go
2022-09-14 15:56:59 +01:00

19 lines
357 B
Go

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