move lang.Must into logx.Must to make sure output fatal message as json
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/logrusorgru/aurora"
|
||||
"github.com/tal-tech/go-zero/core/lang"
|
||||
"github.com/tal-tech/go-zero/core/logx"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/api/parser"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/util"
|
||||
"github.com/urfave/cli"
|
||||
@@ -36,9 +36,9 @@ func JavaCommand(c *cli.Context) error {
|
||||
packetName = packetName[:len(packetName)-4]
|
||||
}
|
||||
|
||||
lang.Must(util.MkdirIfNotExist(dir))
|
||||
lang.Must(genPacket(dir, packetName, api))
|
||||
lang.Must(genComponents(dir, packetName, api))
|
||||
logx.Must(util.MkdirIfNotExist(dir))
|
||||
logx.Must(genPacket(dir, packetName, api))
|
||||
logx.Must(genComponents(dir, packetName, api))
|
||||
|
||||
fmt.Println(aurora.Green("Done."))
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user