chore: add rdbms store

This commit is contained in:
deepzz0
2021-04-30 11:01:03 +08:00
parent 605787958d
commit 7bec238f9c
8 changed files with 354 additions and 103 deletions

View File

@@ -149,10 +149,8 @@ func init() {
panic(err)
}
// read run mode from env
if runmode := os.Getenv("RUN_MODE"); runmode != "" {
if runmode != ModeDev && runmode != ModeProd {
panic("invalid RUN_MODE from env: " + runmode)
}
Conf.RunMode = ModeDev
if runmode := os.Getenv("RUN_MODE"); runmode == ModeProd {
Conf.RunMode = runmode
}
// read env