From b65fcc55127a4eb0e5029b6dfb9b974d4ec0c891 Mon Sep 17 00:00:00 2001 From: stevenzack Date: Fri, 14 Aug 2020 19:25:34 +0800 Subject: [PATCH] fix-lang-must-not-found --- tools/goctl/api/ktgen/cmd.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/goctl/api/ktgen/cmd.go b/tools/goctl/api/ktgen/cmd.go index cd91e18d..cdf31e47 100644 --- a/tools/goctl/api/ktgen/cmd.go +++ b/tools/goctl/api/ktgen/cmd.go @@ -3,7 +3,6 @@ package ktgen import ( "errors" - "github.com/tal-tech/go-zero/core/lang" "github.com/tal-tech/go-zero/tools/goctl/api/parser" "github.com/urfave/cli" ) @@ -31,7 +30,13 @@ func KtCommand(c *cli.Context) error { return e } - lang.Must(genBase(dir, pkg, api)) - lang.Must(genApi(dir, pkg, api)) + e = genBase(dir, pkg, api) + if e != nil { + return e + } + e = genApi(dir, pkg, api) + if e != nil { + return e + } return nil }