mirror of https://github.com/golang/go.git
19 lines
455 B
Plaintext
19 lines
455 B
Plaintext
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
|