-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
51 lines (47 loc) · 1.16 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package main
import (
"fmt"
"os"
figure "github.com/common-nighthawk/go-figure"
"github.com/urfave/cli/v2"
)
func main() {
figure.NewFigure("vIBC KNIFE", "standard", true).Print()
fmt.Println()
app := &cli.App{
Name: "vibc_knife",
Usage: "A cross-platform command line utility for vIBC.",
EnableBashCompletion: true,
Flags: []cli.Flag{},
Commands: []*cli.Command{
{
Name: "new",
Usage: "create a new vIBC project",
Action: newCmd,
Args: true,
ArgsUsage: "<Project Name>",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "path",
Aliases: []string{"p"},
Usage: "Specify the project root",
Value: ".",
},
&cli.BoolFlag{
Name: "force",
Aliases: []string{"f"},
Usage: "Force create the project, ignore whether the project root is already exists",
},
&cli.BoolFlag{
Name: "recurse",
Aliases: []string{"r"},
Usage: "Specify whether the submodules should be recurse after the clone is created",
},
},
},
},
}
if err := app.Run(os.Args); err != nil {
fmt.Println(err)
}
}