-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
56 lines (52 loc) · 1.17 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
52
53
54
55
56
package main
import (
"os"
"github.com/codegangsta/cli"
)
func main() {
runner = RealRunner{}
project := projectName()
paths := getLibPath()
app := cli.NewApp()
app.Name = "gocodeit"
app.Usage = "Utility to manage gocode's lib-path when using GO15VENDOREXPERIMENT"
app.EnableBashCompletion = true
app.Commands = []cli.Command{
{
Name: "set",
Usage: "Add current project's vendor to gocode's lib-path",
Action: func(c *cli.Context) {
set(paths, project)
},
},
{
Name: "show",
Usage: "print some info from the current environment",
Action: func(c *cli.Context) {
show(paths, project)
},
},
{
Name: "status",
Usage: "check if the current project's vendor is already on gocode's lib-path",
Action: func(c *cli.Context) {
status(paths, project)
},
},
{
Name: "reset",
Usage: "this removes any path from gocode's lib-path and set it to only the current project's vendor",
Action: func(c *cli.Context) {
reset(project)
},
},
{
Name: "unset",
Usage: "Removes current project's vendor from gocode's lib-path",
Action: func(c *cli.Context) {
unset(paths, project)
},
},
}
app.Run(os.Args)
}