Skip to content

Commit 7bbaf1c

Browse files
ShinseiSarijen
authored andcommitted
gofmt: add Chinese translation (tldr-pages#17211)
1 parent 0147543 commit 7bbaf1c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pages.zh/common/gofmt.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# gofmt
2+
3+
> 格式化 Go 源代码。
4+
> 更多信息:<https://pkg.go.dev/cmd/gofmt>.
5+
6+
- 格式化文件并在控制台输出结果:
7+
8+
`gofmt {{源代码.go}}`
9+
10+
- 格式化文件并覆盖原文件:
11+
12+
`gofmt -w {{源代码.go}}`
13+
14+
- 格式化文件和简化代码并覆盖原文件:
15+
16+
`gofmt -s -w {{源代码.go}}`
17+
18+
- 打印所有(包括虚假的)错误:
19+
20+
`gofmt -e {{源代码.go}}`

0 commit comments

Comments
 (0)