-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitclone.go
42 lines (35 loc) · 1005 Bytes
/
gitclone.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
package main
import (
"github.com/WindomZ/gitclone/gitclone"
"github.com/WindomZ/go-commander"
)
func main() {
// init
commander.Program.
Command("gitclone").
Description("A cli tool, git clone repository in the `go get` style.").
Version("0.7.0")
// gitclone list
commander.Program.
Command("list").
Aliases([]string{"ls"}).
Description("prints a list of repositories witch in the current directory").
Action(gitclone.ListAction)
// gitclone search
commander.Program.
Command("search <key>").
Description("search repositories witch in current directory").
Action(gitclone.SearchAction)
// gitclone link
commander.Program.
Command("link <filepath>").
Description("`gitclone` a repository from the directory to current directory").
Action(gitclone.LinkAction)
// gitclone
commander.Program.
Command("<repo>").
Description("git clone repository in the 'go get' style").
Action(gitclone.RootAction).
Option("--depth=<depth>")
commander.Program.Parse()
}