|
@ -1,16 +1,17 @@ |
|
|
package hasaki_{{.app_name}} |
|
|
|
|
|
|
|
|
package hasaki_{{.app_name}}_test |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"log" |
|
|
"log" |
|
|
"testing" |
|
|
"testing" |
|
|
|
|
|
|
|
|
|
|
|
"hasaki-service-{{.app_name}}/hasaki_{{.app_name}}" |
|
|
"git.ouxuan.net/hasaki-service/hasaki-sdk/hskconfig" |
|
|
"git.ouxuan.net/hasaki-service/hasaki-sdk/hskconfig" |
|
|
"git.ouxuan.net/hasaki-service/hasaki-sdk/hskdb" |
|
|
"git.ouxuan.net/hasaki-service/hasaki-sdk/hskdb" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
var branch interface{} = "branch_brand_63" |
|
|
var branch interface{} = "branch_brand_63" |
|
|
|
|
|
|
|
|
var api *Api |
|
|
|
|
|
|
|
|
var api hasaki_{{.app}}.*Api |
|
|
|
|
|
|
|
|
func init() { |
|
|
func init() { |
|
|
|
|
|
|
|
@ -18,8 +19,8 @@ func init() { |
|
|
hskconfig.SetGolbalConfigFileName("E:\test.json") |
|
|
hskconfig.SetGolbalConfigFileName("E:\test.json") |
|
|
|
|
|
|
|
|
hskdb.IsAsyncToXormSync2 = false |
|
|
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 { |
|
|
if err != nil { |
|
|
log.Fatalln(err) |
|
|
log.Fatalln(err) |
|
|
} |
|
|
} |
|
|