diff --git a/servicegen/tpl/api_task.tpl b/servicegen/tpl/api_task.tpl index 443e303..7566639 100644 --- a/servicegen/tpl/api_task.tpl +++ b/servicegen/tpl/api_task.tpl @@ -2,9 +2,7 @@ package hasaki_{{.app_name}} import ( "errors" - "fmt" "git.ouxuan.net/hasaki-service/hasaki-service-ticker-task/hasaki_ticker_task" - "time" ) const TestTaskType = "test_task_type" diff --git a/servicegen/tpl/api_test.tpl b/servicegen/tpl/api_test.tpl index 418f3c5..be16610 100644 --- a/servicegen/tpl/api_test.tpl +++ b/servicegen/tpl/api_test.tpl @@ -1,16 +1,17 @@ -package hasaki_{{.app_name}} +package hasaki_{{.app_name}}_test import ( "log" "testing" + "hasaki-service-{{.app_name}}/hasaki_{{.app_name}}" "git.ouxuan.net/hasaki-service/hasaki-sdk/hskconfig" "git.ouxuan.net/hasaki-service/hasaki-sdk/hskdb" ) var branch interface{} = "branch_brand_63" -var api *Api +var api hasaki_{{.app}}.*Api func init() { @@ -18,8 +19,8 @@ func init() { hskconfig.SetGolbalConfigFileName("E:\test.json") hskdb.IsAsyncToXormSync2 = false - api = NewApi(hskdb.GetXormAuto(branch)) - err := InitDbByConfig(branch) + api = hasaki_{{.app_name}}.NewApi(hskdb.GetXormAuto(branch)) + err := hasaki_{{.app_name}}.InitDbByConfig(branch) if err != nil { log.Fatalln(err) }