mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 09:00:20 +08:00
Support goctl env install
(#1752)
Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
parent
89eccfdb97
commit
58a0b17451
9
tools/goctl/env/install.go
vendored
Normal file
9
tools/goctl/env/install.go
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package env
|
||||||
|
|
||||||
|
import "github.com/urfave/cli"
|
||||||
|
|
||||||
|
func Install(c *cli.Context) error {
|
||||||
|
force := c.Bool("force")
|
||||||
|
verbose := c.Bool("verbose")
|
||||||
|
return Prepare(true, force, verbose)
|
||||||
|
}
|
@ -57,6 +57,21 @@ var commands = []cli.Command{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
Subcommands: []cli.Command{
|
Subcommands: []cli.Command{
|
||||||
|
{
|
||||||
|
Name: "install",
|
||||||
|
Usage: "goctl env installation",
|
||||||
|
Action: env.Install,
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "force,f",
|
||||||
|
Usage: "silent installation of non-existent dependencies",
|
||||||
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "verbose, v",
|
||||||
|
Usage: "enable log output",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Name: "check",
|
Name: "check",
|
||||||
Usage: "detect goctl env and dependency tools",
|
Usage: "detect goctl env and dependency tools",
|
||||||
|
Loading…
Reference in New Issue
Block a user