mirror of
https://github.com/1f349/violet.git
synced 2024-11-22 03:11:44 +00:00
23 lines
470 B
Go
23 lines
470 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
_ "embed"
|
|
"flag"
|
|
"github.com/google/subcommands"
|
|
_ "github.com/mattn/go-sqlite3"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
subcommands.Register(subcommands.HelpCommand(), "")
|
|
subcommands.Register(subcommands.FlagsCommand(), "")
|
|
subcommands.Register(subcommands.CommandsCommand(), "")
|
|
subcommands.Register(&serveCmd{}, "")
|
|
subcommands.Register(&setupCmd{}, "")
|
|
|
|
flag.Parse()
|
|
ctx := context.Background()
|
|
os.Exit(int(subcommands.Execute(ctx)))
|
|
}
|