Finally remove utils.Cfg (#8113)

* finally remove utils.Cfg

* fix compile error

* another test compilation fix
This commit is contained in:
Chris
2018-01-17 12:38:37 -06:00
committed by Harrison Healey
parent dce0616305
commit 4e6cc846a6
20 changed files with 157 additions and 153 deletions

View File

@@ -35,7 +35,6 @@ const (
var originalDisableDebugLvl l4g.Level = l4g.DEBUG
var siteURL = ""
var Cfg *model.Config
func GetSiteURL() string {
return siteURL

View File

@@ -168,8 +168,8 @@ func ValidateLicense(signed []byte) (bool, string) {
return true, string(plaintext)
}
func GetAndValidateLicenseFileFromDisk() (*model.License, []byte) {
fileName := GetLicenseFileLocation(*Cfg.ServiceSettings.LicenseFileLocation)
func GetAndValidateLicenseFileFromDisk(location string) (*model.License, []byte) {
fileName := GetLicenseFileLocation(location)
if _, err := os.Stat(fileName); err != nil {
l4g.Debug("We could not find the license key in the database or on disk at %v", fileName)