github.com/jhump/golang-x-tools@v0.0.0-20220218190644-4958d6d39439/internal/lsp/cmd/usage/format.hlp (about) 1 format the code according to the go standard 2 3 Usage: 4 gopls [flags] format [format-flags] <filerange> 5 6 The arguments supplied may be simple file names, or ranges within files. 7 8 Example: reformat this file: 9 10 $ gopls format -w internal/lsp/cmd/check.go 11 12 format-flags: 13 -d,-diff 14 display diffs instead of rewriting files 15 -l,-list 16 list files whose formatting differs from gofmt's 17 -w,-write 18 write result to (source) file instead of stdout