]>
Commit | Line | Data |
---|---|---|
ff524faf JN |
1 | package main |
2 | ||
3 | import ( | |
4 | "log" | |
5 | "os" | |
6 | ||
7 | "github.com/urfave/cli" | |
8 | "njoseph.me/goutils/utils" | |
9 | ) | |
10 | ||
11 | var app = cli.NewApp() | |
12 | ||
13 | func Info() { | |
14 | app.Name = "Go Utils" | |
15 | app.Usage = "goutils command" | |
16 | app.Author = "Joseph Nuthalapati" | |
17 | app.Version = "0.0.1" | |
18 | } | |
19 | ||
20 | func Commands() { | |
21 | app.Commands = []cli.Command{ | |
22 | { | |
23 | Name: "git-pull-all", | |
24 | Aliases: []string{"gpa"}, | |
25 | Action: func(c *cli.Context) { | |
26 | utils.GitPullAll() | |
27 | }, | |
28 | }, | |
29 | } | |
30 | } | |
31 | ||
32 | func main() { | |
33 | Info() | |
34 | Commands() | |
35 | ||
36 | err := app.Run(os.Args) | |
37 | if err != nil { | |
38 | log.Fatal(err) | |
39 | } | |
40 | } |