-
Notifications
You must be signed in to change notification settings - Fork 9
/
main.go
41 lines (36 loc) · 788 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
package main
import (
cli_utils "github.com/tg44/heptapod/pkg/cli-utils"
"github.com/urfave/cli/v2"
"log"
"os"
"sort"
)
var version string = "local-build"
var commit string = ""
var date string = ""
func main() {
app := &cli.App{
Name: "heptapod",
Usage: "Fine-tune your TimeMachine excludes!",
Flags: []cli.Flag{
cli_utils.RulesPathFlag,
cli_utils.LogDirFlag,
cli_utils.VerboseFlag,
cli_utils.ParallelismFlag,
cli_utils.BufferSizeFlag,
},
Commands: []*cli.Command{
cli_utils.VersionCommand(version, commit, date),
cli_utils.RuleCommands,
cli_utils.RunCommand,
cli_utils.TmCommands,
},
}
sort.Sort(cli.FlagsByName(app.Flags))
sort.Sort(cli.CommandsByName(app.Commands))
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}