2023-06-21 23:09:33 +01:00
|
|
|
package main
|
|
|
|
|
2023-07-03 16:27:24 +01:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"flag"
|
|
|
|
"github.com/google/subcommands"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
2023-06-21 23:09:33 +01:00
|
|
|
func main() {
|
2023-07-03 16:27:24 +01:00
|
|
|
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)))
|
2023-06-21 23:09:33 +01:00
|
|
|
}
|