add 'map' cli command to provide map information (#100)

* add 'map' cli command

- provides the following map information functions:
  - list all available maps in the global registry
  - display map metadata

- update docs with map command examples

* add list and info subcommands to map cli command

* rename map command list and info factory functions

* add --all flag to map info subcommand

* handle cmd.Help error
This commit is contained in:
Blayne Campbell 2022-08-09 16:06:28 -06:00 committed by GitHub
parent 91106aec09
commit ffeb401377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 177 additions and 0 deletions

View file

@ -21,6 +21,12 @@ var rootCmd = &cobra.Command{
func Execute() {
rootCmd.AddCommand(NewPlayCommand())
mapCommand := NewMapCommand()
mapCommand.AddCommand(NewMapListCommand())
mapCommand.AddCommand(NewMapInfoCommand())
rootCmd.AddCommand(mapCommand)
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)