aboutsummaryrefslogtreecommitdiff
path: root/cmd/x/main.go
blob: d8658d168858096b7cd8789d98f2548f8b25c3ab (plain)
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
package main

import (
	"context"
	"os"

	"github.com/google/subcommands"
	"within.website/x/internal"
)

func main() {
	subcommands.Register(subcommands.HelpCommand(), "")
	subcommands.Register(subcommands.FlagsCommand(), "")
	subcommands.Register(subcommands.CommandsCommand(), "")

	// Switch tracker
	subcommands.Register(&miListSwitches{}, "switch-tracker")
	subcommands.Register(&miSwitch{}, "switch-tracker")
	subcommands.Register(&miWhoIsFront{}, "switch-tracker")

	// Events
	subcommands.Register(&miListEvents{}, "events")
	subcommands.Register(&miAddEvent{}, "events")
	subcommands.Register(&miRemoveEvent{}, "events")

	// Sanguisuga
	subcommands.Register(&sanguisugaAnimeList{}, "sanguisuga")
	subcommands.Register(&sanguisugaAnimeTrack{}, "sanguisuga")
	subcommands.Register(&sanguisugaTVList{}, "sanguisuga")
	subcommands.Register(&sanguisugaTVTrack{}, "sanguisuga")

	internal.HandleStartup()
	ctx := context.Background()

	os.Exit(int(subcommands.Execute(ctx)))
}