aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/cmd/usage/format.hlp
blob: 7ef0bbe4314f1540c9d14856dbc858f7960e307c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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