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/security_update_check.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/security_update_check.go') diff --git a/app/security_update_check.go b/app/security_update_check.go index 32d1f4d31..bac558c8c 100644 --- a/app/security_update_check.go +++ b/app/security_update_check.go @@ -31,7 +31,7 @@ const ( ) func (a *App) DoSecurityUpdateCheck() { - if *utils.Cfg.ServiceSettings.EnableSecurityFixAlert { + if *a.Config().ServiceSettings.EnableSecurityFixAlert { if result := <-a.Srv.Store.System().Get(); result.Err == nil { props := result.Data.(model.StringMap) lastSecurityTime, _ := strconv.ParseInt(props[model.SYSTEM_LAST_SECURITY_TIME], 10, 0) @@ -45,7 +45,7 @@ func (a *App) DoSecurityUpdateCheck() { v.Set(PROP_SECURITY_ID, utils.CfgDiagnosticId) v.Set(PROP_SECURITY_BUILD, model.CurrentVersion+"."+model.BuildNumber) v.Set(PROP_SECURITY_ENTERPRISE_READY, model.BuildEnterpriseReady) - v.Set(PROP_SECURITY_DATABASE, *utils.Cfg.SqlSettings.DriverName) + v.Set(PROP_SECURITY_DATABASE, *a.Config().SqlSettings.DriverName) v.Set(PROP_SECURITY_OS, runtime.GOOS) if len(props[model.SYSTEM_RAN_UNIT_TESTS]) > 0 { -- cgit v1.2.3-1-g7c22