-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
45 lines (41 loc) · 939 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
package main
import (
"log"
"os"
"github.com/urfave/cli/v2"
)
func main() {
app := &cli.App{
Name: "radlicalize",
Usage: "A CLI tool used to clone either remote or local git repos to Radicle.xyz",
Commands: []*cli.Command{
{
Name: "local",
Aliases: []string{"l"},
Usage: "Use to clone any local repos to Radicle",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "private",
Aliases: []string{"p"},
Usage: "Use this flag if you want the repo to be private.",
},
},
Action: func(ctx *cli.Context) error {
private := ctx.Bool("private")
return LocalClone(private)
},
},
{
Name: "remote",
Aliases: []string{"r"},
Usage: "Use to clone any remote public repos on Github to Radicle",
Action: func(ctx *cli.Context) error {
return RemoteClone()
},
},
},
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}