forked from josephyzhou/gigo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
49 lines (41 loc) · 877 Bytes
/
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
package main
import (
"github.com/nariyu/gigo/actions"
"github.com/codegangsta/cli"
"log"
"os"
)
func main() {
gopath := os.Getenv("GOPATH")
if gopath == "" {
log.Fatal("GOPATH environment variable is not set.")
}
app := cli.NewApp()
app.Name = "gigo"
app.Version = "0.3.0"
app.Commands = []cli.Command {
{
Name: "install",
Usage: "Install packages",
// command-line sub-flags for instal
Flags: []cli.Flag{
cli.StringFlag{
Name: "r",
Usage: "Path to the file listing golang packages to fetch",
},
},
Action: actions.Install,
},
{
Name: "uninstall",
Usage: "Uninstall packages",
Action: actions.Uninstall,
},
{
Name: "list",
Usage: "List of installed packages",
Action: actions.List,
},
}
app.Run(os.Args)
}