mirror of
https://github.com/eiblog/eiblog.git
synced 2026-03-01 00:34:58 +08:00
fix: default RUN_MODE=prod
This commit is contained in:
1 parent
1a9628a5dc
commit
5aa8152802
4 files changed
+12
-10
No files matched your search
@@ -28,9 +28,12 @@ var Conf Config
|
||||
// load config file
|
||||
func init() {
|
||||
// run mode
|
||||
mode := config.RunMode(os.Getenv("RUN_MODE"))
|
||||
if !mode.IsRunMode() {
|
||||
panic("config: unsupported env RUN_MODE: " + mode)
|
||||
mode := config.RunModeProd
|
||||
if m := os.Getenv("RUN_MODE"); m != "" {
|
||||
mode = config.RunMode(m)
|
||||
if !mode.IsRunMode() {
|
||||
panic("config: unsupported env RUN_MODE: " + mode)
|
||||
}
|
||||
}
|
||||
logrus.Infof("Run mode:%s", mode)
|
||||
|
||||
|
||||
Reference in new issue
Block a user