diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2023-12-30 16:00:20 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2023-12-30 16:00:20 -0500 |
| commit | 809fc4639e58ca9ca082ce68b5c62b463b2f1e1d (patch) | |
| tree | 1cb7b9951a80509b827b8e5bd1eb2dd09e87aec1 /pkg | |
| parent | Initial Commit (diff) | |
| download | cli-809fc4639e58ca9ca082ce68b5c62b463b2f1e1d.zip | |
Add initial code
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)) +} |