Files
mirror-sync/cmd/cli/main.go
2025-10-20 00:15:57 +02:00

26 lines
547 B
Go

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)))
}