diff options
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/cli/cli.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go new file mode 100644 index 0000000..bbbd8d1 --- /dev/null +++ b/pkg/cli/cli.go @@ -0,0 +1,20 @@ +package cli + +import ( + "context" + "flag" + + "github.com/eugenetriguba/bolt/internal/commands" + "github.com/google/subcommands" +) + +func Run() int { + subcommands.Register(subcommands.HelpCommand(), "") + subcommands.Register(subcommands.FlagsCommand(), "") + subcommands.Register(subcommands.CommandsCommand(), "") + subcommands.Register(&commands.MigrateCmd{}, "") + + flag.Parse() + ctx := context.Background() + return int(subcommands.Execute(ctx)) +} |