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

19 lines
338 B
Go
Raw Permalink Normal View History

2022-09-14 20:26:59 +05:30
package config
import (
"log"
"github.com/spf13/viper"
)
2022-09-17 03:40:37 +05:30
func OAuthURL() string {
2022-09-14 20:26:59 +05:30
viper.SetConfigName("config")
viper.AddConfigPath("./data")
err := viper.ReadInConfig()
if err != nil {
log.Println("Error reading config for getting oauth.auth_url", err.Error())
}
result := viper.GetString("oauth.auth_url")
return result
}