This commit is contained in:
2025-10-25 20:03:36 +02:00
parent 381a4e4988
commit 6224e63fa9
5 changed files with 154 additions and 1 deletions

View File

@@ -3,7 +3,9 @@ package main
import (
"context"
"flag"
"fmt"
"mirror-sync/cmd/cli/commands/apply"
"mirror-sync/cmd/cli/commands/list"
"mirror-sync/cmd/cli/commands/version"
"os"
@@ -11,6 +13,12 @@ import (
)
func main() {
defer func() {
if r := recover(); r != nil {
fmt.Fprintln(os.Stderr, "fatal:", r)
}
}()
subcommands.Register(subcommands.HelpCommand(), "help")
subcommands.Register(subcommands.FlagsCommand(), "help")
subcommands.Register(subcommands.CommandsCommand(), "help")
@@ -18,6 +26,8 @@ func main() {
subcommands.Register(&apply.ApplyCmd{}, "projects")
subcommands.Register(&list.ListCmd{}, "management")
flag.Parse()
ctx := context.Background()