goctl add plugin support (#243)
* add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * add plugin support * remove no need * add plugin support * rename * rename * add plugin support * refactor * update plugin * refactor * refactor * refactor * update plugin * newline Co-authored-by: anqiansong <anqiansong@xiaoheiban.cn>
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"github.com/tal-tech/go-zero/tools/goctl/docker"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/kube"
|
||||
model "github.com/tal-tech/go-zero/tools/goctl/model/sql/command"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/plugin"
|
||||
rpc "github.com/tal-tech/go-zero/tools/goctl/rpc/cli"
|
||||
"github.com/tal-tech/go-zero/tools/goctl/tpl"
|
||||
"github.com/urfave/cli"
|
||||
@@ -186,6 +187,30 @@ var (
|
||||
},
|
||||
Action: ktgen.KtCommand,
|
||||
},
|
||||
{
|
||||
Name: "plugin",
|
||||
Usage: "custom file generator",
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "plugin",
|
||||
Usage: "the plugin file",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "dir",
|
||||
Usage: "the target directory",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "api",
|
||||
Usage: "the api file",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "style",
|
||||
Required: false,
|
||||
Usage: "the file naming format, see [https://github.com/tal-tech/go-zero/tree/master/tools/goctl/config/readme.md]",
|
||||
},
|
||||
},
|
||||
Action: plugin.PluginCommand,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user