-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
55 lines (48 loc) · 920 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
46
47
48
49
50
51
52
53
54
55
package main
import (
"log"
"os"
"primetools/cmd/export"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
"primetools/cmd"
"primetools/cmd/add"
"primetools/cmd/dump"
"primetools/cmd/fix"
_import "primetools/cmd/import"
"primetools/cmd/sync"
"primetools/cmd/test"
)
func main() {
logrus.SetFormatter(&logrus.TextFormatter{
ForceColors: true,
DisableTimestamp: true,
})
log.SetOutput(logrus.New().Writer())
// app := cli.NewApp()
app := &cli.App{
Name: "primetools",
Usage: cmd.Usage,
Version: "0.1.0",
Commands: []*cli.Command{
sync.Cmd(),
fix.Cmd(),
dump.Cmd(),
add.Cmd(),
_import.Cmd(),
test.Cmd(),
export.Cmd(),
},
// Before: func(context *cli.Context) error {
// if context.Bool(cmd.Dryrun) {
// options.SetDryRun()
// }
// return nil
// },
}
app.Setup()
err := app.Run(os.Args)
if err != nil {
logrus.Fatal(err)
}
}