hcl/fmtcmd: Clarify docs for Options.Diff

This description was originally copied straight from gofmt[0]. But as noted
in hashicorp/terraform#6343, the "instead of rewriting" suggests that it
disables the `Write` option, whereas it is possible to enable both.

[0]: https://golang.org/src/cmd/gofmt/gofmt.go#L31
This commit is contained in:
Dan Carley 2016-04-28 18:03:01 +01:00
parent 9a905a34e6
commit 1793ae0f56

View File

@ -25,7 +25,7 @@ var (
type Options struct {
List bool // list files whose formatting differs
Write bool // write result to (source) file instead of stdout
Diff bool // display diffs instead of rewriting files
Diff bool // display diffs of formatting changes
}
func isValidFile(f os.FileInfo, extensions []string) bool {