feat: Replace cli to cobra (#1855)

* Replace cli

* Replace cli

* Replace cli

* Format code

* Add compare case

* Add compare case

* Add compare case

* Support go style flag

* Support go style flag

* Add test case
This commit is contained in:
anqiansong
2022-05-07 15:40:11 +08:00
committed by GitHub
parent 51472004a3
commit 5383e29ce6
61 changed files with 1858 additions and 1590 deletions

View File

@@ -1,9 +1,9 @@
package env
import "github.com/urfave/cli"
import (
"github.com/spf13/cobra"
)
func Install(c *cli.Context) error {
force := c.Bool("force")
verbose := c.Bool("verbose")
return Prepare(true, force, verbose)
func install(_ *cobra.Command, _ []string) error {
return Prepare(true, boolVarForce, boolVarVerbose)
}