<#12822 Go: support passthrough args for `gofmt`> ...
# github-notifications
q
#12822 Go: support passthrough args for `gofmt` Issue created by Eric-Arellano The options:
Copy code
usage: gofmt [flags] [path ...]
  -cpuprofile string
    	write cpu profile to this file
  -d	display diffs instead of rewriting files
  -e	report all errors (not just the first 10 on different lines)
  -l	list files whose formatting differs from gofmt's
  -r string
    	rewrite rule (e.g., 'a[b:len(a)] -> a[b:]')
  -s	simplify code
  -w	write result to (
-e
,
-r
, and
-s
are useful to let users set. But the others probably should not be allowed. Two ways to model that: a) having an --args option and validating -w etc are not set b) having dedicated options like --gofmt-simplify I suspect the
--args
option is the most idiomatic for Pants. pantsbuild/pants
u