MCPcopy
hub / github.com/hashicorp/packer / Help

Method Help

command/fmt.go:74–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72}
73
74func (*FormatCommand) Help() string {
75 helpText := `
76Usage: packer fmt [options] [TEMPLATE]
77
78 Rewrites all Packer configuration files to a canonical format. Both
79 configuration files (.pkr.hcl) and variable files (.pkrvars.hcl) are updated.
80 JSON files (.json) are not modified.
81
82 If TEMPLATE is "." the current directory will be used.
83 If TEMPLATE is "-" then content will be read from STDIN.
84
85 The given content must be in Packer's HCL2 configuration language; JSON is
86 not supported.
87
88Options:
89 -check Check if the input is formatted. Exit status will be 0 if all
90 input is properly formatted and non-zero otherwise.
91
92 -diff Display diffs of formatting change
93
94 -write=false Don't write to source files
95 (always disabled if using -check)
96
97 -recursive Also process files in subdirectories. By default, only the
98 given directory (or current directory) is processed.
99`
100
101 return strings.TrimSpace(helpText)
102}
103
104func (*FormatCommand) Synopsis() string {
105 return "Rewrites HCL2 config files to canonical format"

Callers 1

ParseArgsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected