mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 12:58:35 +07:00
23 lines
448 B
Go
23 lines
448 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/segmentio/terraform-docs/internal/format"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var xmlCmd = &cobra.Command{
|
|
Args: cobra.ExactArgs(1),
|
|
Use: "xml [PATH]",
|
|
Short: "Generate XML of inputs and outputs",
|
|
Annotations: map[string]string{
|
|
"kind": "formatter",
|
|
},
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return doPrint(args[0], format.NewXML(settings))
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(xmlCmd)
|
|
}
|