1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-02 16:38:37 +00:00

Refactor config package

- Parse configuration only once during startup time
- Store configuration values in a global variable
This commit is contained in:
Frédéric Guillot 2019-06-01 18:18:09 -07:00 committed by fguillot
parent 04d85b3c63
commit 228862fefa
28 changed files with 922 additions and 624 deletions

View file

@ -9,10 +9,10 @@ import (
"miniflux.app/oauth2"
)
func getOAuth2Manager(cfg *config.Config) *oauth2.Manager {
func getOAuth2Manager() *oauth2.Manager {
return oauth2.NewManager(
cfg.OAuth2ClientID(),
cfg.OAuth2ClientSecret(),
cfg.OAuth2RedirectURL(),
config.Opts.OAuth2ClientID(),
config.Opts.OAuth2ClientSecret(),
config.Opts.OAuth2RedirectURL(),
)
}