Files
terraform-docs/cmd/toml/toml.go
Khosrow Moossavi 04a9ef49eb refactor: Refactor cli implemention and configuration (#266)
* Refactor cli implemention and configuration

* cleanup
2020-05-20 22:21:19 -04:00

21 lines
498 B
Go

package toml
import (
"github.com/spf13/cobra"
"github.com/segmentio/terraform-docs/internal/cli"
)
// NewCommand returns a new cobra.Command for 'toml' formatter
func NewCommand(config *cli.Config) *cobra.Command {
cmd := &cobra.Command{
Args: cobra.ExactArgs(1),
Use: "toml [PATH]",
Short: "Generate TOML of inputs and outputs",
Annotations: cli.Annotations("toml"),
PreRunE: cli.PreRunEFunc(config),
RunE: cli.RunEFunc(config),
}
return cmd
}