This commit is contained in:
2025-10-20 00:15:57 +02:00
parent 68902f86af
commit 8ca8918966
7 changed files with 204 additions and 0 deletions

25
cmd/cli/main.go Normal file
View File

@@ -0,0 +1,25 @@
package main
import (
"context"
"flag"
"mirror-sync/cmd/cli/commands/apply"
"mirror-sync/cmd/cli/commands/version"
"os"
"github.com/google/subcommands"
)
func main() {
subcommands.Register(subcommands.HelpCommand(), "help")
subcommands.Register(subcommands.FlagsCommand(), "help")
subcommands.Register(subcommands.CommandsCommand(), "help")
subcommands.Register(&version.VersionCmd{}, "help")
subcommands.Register(&apply.ApplyCmd{}, "projects")
flag.Parse()
ctx := context.Background()
os.Exit(int(subcommands.Execute(ctx)))
}