Files
terraform-docs/cmd/pretty.go
Khosrow Moossavi 40bd96be44 docs: Enhance automatic document generation (#227)
* Enhance automatic document generation

* update contribuor guide

* fix broken link
2020-03-29 18:17:55 -04:00

25 lines
575 B
Go

package cmd
import (
"github.com/segmentio/terraform-docs/internal/format"
"github.com/spf13/cobra"
)
var prettyCmd = &cobra.Command{
Args: cobra.ExactArgs(1),
Use: "pretty [PATH]",
Short: "Generate colorized pretty of inputs and outputs",
Annotations: map[string]string{
"kind": "formatter",
},
RunE: func(cmd *cobra.Command, args []string) error {
return doPrint(args[0], format.NewPretty(settings))
},
}
func init() {
prettyCmd.PersistentFlags().BoolVar(new(bool), "no-color", false, "do not colorize printed result")
rootCmd.AddCommand(prettyCmd)
}