* app.UpdateConfig method

* test fix

* another test fix

* the config override option as-was is just error prone, remove it for now

* derp
Этот коммит содержится в:
Chris
2017-10-18 15:36:43 -07:00
коммит произвёл GitHub
родитель 34a87fa8f4
Коммит 8e19ba029f
91 изменённых файлов: 1390 добавлений и 1276 удалений

Просмотреть файл

@@ -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()) {