|
@@ -43,13 +43,15 @@ import ( |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
func checkRunMode() { |
|
|
func checkRunMode() { |
|
|
switch setting.Cfg.Section("").Key("RUN_MODE").String() { |
|
|
|
|
|
case "prod": |
|
|
|
|
|
|
|
|
switch setting.RunMode { |
|
|
|
|
|
case "dev": |
|
|
|
|
|
git.Debug = true |
|
|
|
|
|
case "test": |
|
|
|
|
|
git.Debug = true |
|
|
|
|
|
default: |
|
|
macaron.Env = macaron.PROD |
|
|
macaron.Env = macaron.PROD |
|
|
macaron.ColorLog = false |
|
|
macaron.ColorLog = false |
|
|
setting.ProdMode = true |
|
|
setting.ProdMode = true |
|
|
default: |
|
|
|
|
|
git.Debug = true |
|
|
|
|
|
} |
|
|
} |
|
|
log.Info("Run Mode: %s", strings.Title(macaron.Env)) |
|
|
log.Info("Run Mode: %s", strings.Title(macaron.Env)) |
|
|
} |
|
|
} |
|
|