add runner

This commit is contained in:
kim
2020-08-08 15:16:59 +08:00
committed by Kevin Wan
parent 760d3c8c4b
commit b1e8dd62da
8 changed files with 25 additions and 16 deletions

View File

@@ -12,6 +12,7 @@ import (
"zero/tools/goctl/api/spec"
apiutil "zero/tools/goctl/api/util"
"zero/tools/goctl/util"
"zero/tools/goctl/vars"
)
const (
@@ -129,7 +130,7 @@ func genRoutes(dir string, api *spec.ApiSpec) error {
func genRouteImports(parentPkg string, api *spec.ApiSpec) string {
var importSet = collection.NewSet()
importSet.AddStr(`"zero/rest"`)
importSet.AddStr(fmt.Sprintf("\"%s/rest\"", vars.ProjectOpenSourceUrl))
importSet.AddStr(fmt.Sprintf("\"%s\"", path.Join(parentPkg, contextDir)))
for _, group := range api.Service.Groups {
for _, route := range group.Routes {