* 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
24 lines
360 B
Go
24 lines
360 B
Go
package commands
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func NewMapCommand() *cobra.Command {
|
|
|
|
var mapCmd = &cobra.Command{
|
|
Use: "map",
|
|
Short: "Display map information",
|
|
Long: "Display map information",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
err := cmd.Help()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
},
|
|
}
|
|
|
|
return mapCmd
|
|
}
|