mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-16 20:00:25 +00:00
Update cheatsheets
This commit is contained in:
38
tldr/gofumpt
Normal file
38
tldr/gofumpt
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gofumpt
|
||||
|
||||
> Strictly format Go files.
|
||||
> See also: `gofmt`.
|
||||
> More information: <https://github.com/mvdan/gofumpt#gofumpt>.
|
||||
|
||||
- Format Go files:
|
||||
|
||||
`gofumpt -w {{path/to/directory}}`
|
||||
|
||||
- [l]ist files whose formatting differs from `gofumpt`:
|
||||
|
||||
`gofumpt -l {{path/to/directory}}`
|
||||
|
||||
- Report all [e]rrors:
|
||||
|
||||
`gofumpt -e {{path/to/directory}}`
|
||||
|
||||
- Display [d]iffs:
|
||||
|
||||
`gofumpt -d {{path/to/directory}}`
|
||||
|
||||
- Format Go files with stricter rules:
|
||||
|
||||
`gofumpt -extra {{path/to/directory}}`
|
||||
|
||||
- Display [d]iffs with stricter rules:
|
||||
|
||||
`gofumpt -extra -d {{path/to/directory}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`gofumpt {{[-h|--help]}}`
|
||||
Reference in New Issue
Block a user