blob: 7ef0bbe4314f1540c9d14856dbc858f7960e307c [file] [log] [blame]
format the code according to the go standard
Usage:
gopls [flags] format [format-flags] <filerange>
The arguments supplied may be simple file names, or ranges within files.
Example: reformat this file:
$ gopls format -w internal/lsp/cmd/check.go
format-flags:
-d,-diff
display diffs instead of rewriting files
-l,-list
list files whose formatting differs from gofmt's
-w,-write
write result to (source) file instead of stdout