mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 04:48:33 +07:00
22 lines
563 B
Go
22 lines
563 B
Go
package table
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/segmentio/terraform-docs/internal/cli"
|
|
)
|
|
|
|
// NewCommand returns a new cobra.Command for 'asciidoc table' formatter
|
|
func NewCommand(config *cli.Config) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Args: cobra.ExactArgs(1),
|
|
Use: "table [PATH]",
|
|
Aliases: []string{"tbl"},
|
|
Short: "Generate AsciiDoc tables of inputs and outputs",
|
|
Annotations: cli.Annotations("asciidoc table"),
|
|
PreRunE: cli.PreRunEFunc(config),
|
|
RunE: cli.RunEFunc(config),
|
|
}
|
|
return cmd
|
|
}
|