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

Method AddFlagSets

command/cli.go:226–232  ·  view source on GitHub ↗
(flags *flag.FlagSet)

Source from the content-addressed store, hash-verified

224}
225
226func (va *FormatArgs) AddFlagSets(flags *flag.FlagSet) {
227 flags.BoolVar(&va.Check, "check", false, "check if the input is formatted")
228 flags.BoolVar(&va.Diff, "diff", false, "display the diff of formatting changes")
229 flags.BoolVar(&va.Write, "write", true, "overwrite source files instead of writing to stdout")
230 flags.BoolVar(&va.Recursive, "recursive", false, "Also process files in subdirectories")
231 va.MetaArgs.AddFlagSets(flags)
232}
233
234// FormatArgs represents a parsed cli line for `packer fmt`
235type FormatArgs struct {

Callers 1

ParseArgsMethod · 0.95

Calls 1

AddFlagSetsMethod · 0.45

Tested by

no test coverage detected