Skip to content

Commit

Permalink
Support goctl env install (#1752)
Browse files Browse the repository at this point in the history
Co-authored-by: anqiansong <anqiansong@bytedance.com>
  • Loading branch information
kesonan and anqiansong authored Apr 3, 2022
1 parent 89eccfd commit 58a0b17
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/goctl/env/install.go
Original file line number Diff line number Diff line change
@@ -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)
}
15 changes: 15 additions & 0 deletions tools/goctl/goctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ var commands = []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",
Usage: "detect goctl env and dependency tools",
Expand Down

0 comments on commit 58a0b17

Please sign in to comment.