From 8e19ba029f889519d93cf272960dce858971106c Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 18 Oct 2017 15:36:43 -0700 Subject: Reduce utils.Cfg references (#7650) * app.UpdateConfig method * test fix * another test fix * the config override option as-was is just error prone, remove it for now * derp --- app/app.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/app.go') diff --git a/app/app.go b/app/app.go index 34c0721a0..c82520cd9 100644 --- a/app/app.go +++ b/app/app.go @@ -47,8 +47,7 @@ type App struct { Mfa einterfaces.MfaInterface Saml einterfaces.SamlInterface - newStore func() store.Store - configOverride func(*model.Config) *model.Config + newStore func() store.Store } var appCount = 0 @@ -234,12 +233,13 @@ func (a *App) initEnterprise() { } func (a *App) Config() *model.Config { - if a.configOverride != nil { - return a.configOverride(utils.Cfg) - } return utils.Cfg } +func (a *App) UpdateConfig(f func(*model.Config)) { + f(utils.Cfg) +} + // Go creates a goroutine, but maintains a record of it to ensure that execution completes before // the app is destroyed. func (a *App) Go(f func()) { -- cgit v1.2.3-1-g7c22