forked from impact/impact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.go
37 lines (27 loc) · 826 Bytes
/
client.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
package main
import "os"
import "github.com/xogeny/impact/cmds"
import "github.com/jessevdk/go-flags"
func main() {
var options struct{} // No common flags
parser := flags.NewParser(&options, flags.Default)
parser.AddCommand("search",
"Search for libraries associated with specific terms",
"Search for libraries associated with specific terms",
&cmds.SearchCommand{})
parser.AddCommand("list",
"List all available libraries",
"List all available libraries",
&cmds.ListCommand{})
parser.AddCommand("install",
"Install named libraries",
"Install named libraries",
&cmds.InstallCommand{})
parser.AddCommand("info",
"Print information about a specific library",
"Print information about a specific library",
&cmds.InfoCommand{})
if _, err := parser.Parse(); err != nil {
os.Exit(1)
}
}