mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-31 20:15:42 +02:00
gofmt: add Chinese translation (#17211)
This commit is contained in:
parent
3b6fb489e5
commit
10d2042e7c
1 changed files with 20 additions and 0 deletions
20
pages.zh/common/gofmt.md
Normal file
20
pages.zh/common/gofmt.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# gofmt
|
||||
|
||||
> 格式化 Go 源代码。
|
||||
> 更多信息:<https://pkg.go.dev/cmd/gofmt>.
|
||||
|
||||
- 格式化文件并在控制台输出结果:
|
||||
|
||||
`gofmt {{源代码.go}}`
|
||||
|
||||
- 格式化文件并覆盖原文件:
|
||||
|
||||
`gofmt -w {{源代码.go}}`
|
||||
|
||||
- 格式化文件和简化代码并覆盖原文件:
|
||||
|
||||
`gofmt -s -w {{源代码.go}}`
|
||||
|
||||
- 打印所有(包括虚假的)错误:
|
||||
|
||||
`gofmt -e {{源代码.go}}`
|
Loading…
Add table
Reference in a new issue