mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-09 16:26:53 +02:00
Merge pull request #2936 from CraryPrimitiveMan/patch-1
[go/zh-cn]Add brace
This commit is contained in:
committed by
GitHub
commit
e5ea3d0b7f
@@ -142,6 +142,7 @@ func learnTypes() {
|
|||||||
func learnNamedReturns(x, y int) (z int) {
|
func learnNamedReturns(x, y int) (z int) {
|
||||||
z = x * y
|
z = x * y
|
||||||
return // z is implicit here, because we named it earlier.
|
return // z is implicit here, because we named it earlier.
|
||||||
|
}
|
||||||
|
|
||||||
// Go全面支持垃圾回收。Go有指针,但是不支持指针运算。
|
// Go全面支持垃圾回收。Go有指针,但是不支持指针运算。
|
||||||
// 你会因为空指针而犯错,但是不会因为增加指针而犯错。
|
// 你会因为空指针而犯错,但是不会因为增加指针而犯错。
|
||||||
|
Reference in New Issue
Block a user