move lang.Must into logx.Must to make sure output fatal message as json
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
"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/urfave/cli"
|
||||
)
|
||||
@@ -32,8 +32,8 @@ func DartCommand(c *cli.Context) error {
|
||||
dir = dir + "/"
|
||||
}
|
||||
api.Info.Title = strings.Replace(apiFile, ".api", "", -1)
|
||||
lang.Must(genData(dir+"data/", api))
|
||||
lang.Must(genApi(dir+"api/", api))
|
||||
lang.Must(genVars(dir + "vars/"))
|
||||
logx.Must(genData(dir+"data/", api))
|
||||
logx.Must(genApi(dir+"api/", api))
|
||||
logx.Must(genVars(dir + "vars/"))
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user