mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 12:58:35 +07:00
* Migrate to github.com/terraform-docs org * remove codecov token * update maintenance notice in README
22 lines
582 B
Go
22 lines
582 B
Go
package document
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/terraform-docs/terraform-docs/internal/cli"
|
|
)
|
|
|
|
// NewCommand returns a new cobra.Command for 'markdown document' formatter
|
|
func NewCommand(config *cli.Config) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Args: cobra.ExactArgs(1),
|
|
Use: "document [PATH]",
|
|
Aliases: []string{"doc"},
|
|
Short: "Generate Markdown document of inputs and outputs",
|
|
Annotations: cli.Annotations("markdown document"),
|
|
PreRunE: cli.PreRunEFunc(config),
|
|
RunE: cli.RunEFunc(config),
|
|
}
|
|
return cmd
|
|
}
|