-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
41 lines (34 loc) · 1.28 KB
/
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
// This main package, which builds a 'zelkata' binary, will serve as a simple CLI entry point for creatuing, curating,
// querying, and generally _using_ the Zelkata system. The urfave/cli package seems to quite nicely supply all the
// tools I need to not get bogged down in CLI work., and I can focus on the core functionality of the system itself.
package main
import (
"context"
"os"
"github.com/omnikron13/zelkata/tui"
"github.com/urfave/cli/v3"
)
// main entry point for the 'top level' command 'zelkata'. Handling is then passed over to urfave/cli. This _may_ be
// a temporary arrangement, as I'm unsure how much overlap there is likely to be be with my ultimate plan of a modern
// TUI rather than a 'flags and subcommands' model. I may maintain both though, along with web interfaces, apps, etc.
func main() {
cmd:= &cli.Command{
Name: "Zelkata",
Usage: "add notes and stuff",
Commands: []*cli.Command{
{
Name: "add",
Aliases: []string{"a"},
Usage: "add a note",
Action: addCmd,
},
{
Name: "tui",
Aliases: []string{"t"},
Usage: "start the TUI",
Action: tui.MainTui,
},
},
}
cmd.Run(context.Background(), os.Args)
}