最新可以跑单元测试

This commit is contained in:
eson
2023-06-12 18:08:34 +08:00
parent e0b0e2aff8
commit fc806b71c6
13 changed files with 165 additions and 86 deletions

View File

@@ -24,3 +24,23 @@ func main() {
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
server.Start()
}
// var testConfigFile = flag.String("f", "../etc/{{.serviceName}}.yaml", "the config file")
// func GetTestServer() *rest.Server {
// flag.Parse()
// var c config.Config
// conf.MustLoad(*testConfigFile, &c)
// server := rest.MustNewServer(c.RestConf)
// defer server.Stop()
// ctx := svc.NewServiceContext(c)
// handler.RegisterHandlers(server, ctx)
// fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
// return server
// }