From 6a2d6786c69a8ce2ec04c53e2534fbab144f6eea Mon Sep 17 00:00:00 2001 From: taobig Date: Sat, 2 Jul 2022 00:22:42 +0800 Subject: [PATCH] remove legacy code (#2086) --- tools/goctl/api/gogen/genhandlers.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/goctl/api/gogen/genhandlers.go b/tools/goctl/api/gogen/genhandlers.go index 21c3396a..6cb1ee10 100644 --- a/tools/goctl/api/gogen/genhandlers.go +++ b/tools/goctl/api/gogen/genhandlers.go @@ -8,7 +8,6 @@ import ( "github.com/zeromicro/go-zero/tools/goctl/api/spec" "github.com/zeromicro/go-zero/tools/goctl/config" - "github.com/zeromicro/go-zero/tools/goctl/internal/version" "github.com/zeromicro/go-zero/tools/goctl/pkg/golang" "github.com/zeromicro/go-zero/tools/goctl/util" "github.com/zeromicro/go-zero/tools/goctl/util/format" @@ -99,13 +98,7 @@ func genHandlerImports(group spec.Group, route spec.Route, parentPkg string) str if len(route.RequestTypeName()) > 0 { imports = append(imports, fmt.Sprintf("\"%s\"\n", pathx.JoinPackages(parentPkg, typesDir))) } - - currentVersion := version.GetGoctlVersion() - // todo(anqiansong): This will be removed after a certain number of production versions of goctl (probably 5) - if !version.IsVersionGreaterThan(currentVersion, "1.1.10") { - imports = append(imports, fmt.Sprintf("\"%s/rest/httpx\"", vars.ProjectOpenSourceURL)) - } - + imports = append(imports, fmt.Sprintf("\"%s/rest/httpx\"", vars.ProjectOpenSourceURL)) return strings.Join(imports, "\n\t") }