From 66c73e52a7b9e152cd0f180120305bd23e473409 Mon Sep 17 00:00:00 2001 From: yedf2 <120050102@qq.com> Date: Fri, 15 Oct 2021 20:20:18 +0800 Subject: [PATCH] fix dbtype error when args=1 --- app/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/main.go b/app/main.go index e9f4094..c85b943 100644 --- a/app/main.go +++ b/app/main.go @@ -19,15 +19,14 @@ usage: Available commands: dtmsvr run dtm as a server - dev create all needed table and run dtm as a server - bench start bench server + dev create all needed table and run dtm as a server + bench start bench server quick_start run quick start example (dtm will create needed table) qs same as quick_start ` func main() { - dtmcli.SetCurrentDBType(common.DtmConfig.DB["driver"]) if len(os.Args) == 1 { fmt.Println(usage) for name := range examples.Samples { @@ -35,6 +34,7 @@ func main() { } return } + dtmcli.SetCurrentDBType(common.DtmConfig.DB["driver"]) if os.Args[1] != "dtmsvr" { // 实际线上运行,只启动dtmsvr,不准备table相关的数据 dtmsvr.PopulateDB(true) examples.PopulateDB(true)