Skip to content

Commit e2ccb8f

Browse files
author
guozhiwei
committed
Update 02.3.md
多了一个[
1 parent 2cb64f0 commit e2ccb8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

02.3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ Go语言中有种不错的设计,即延迟(defer)语句,你可以在函
367367

368368
在Go中函数也是一种变量,我们可以通过`type`来定义它,它的类型就是所有拥有相同的参数,相同的返回值的一种类型
369369

370-
type typeName func(input1 inputType1 [, input2 inputType2 [, ...]) (result1 resultType1 [, ...])
370+
type typeName func(input1 inputType1 , input2 inputType2 [, ...]) (result1 resultType1 [, ...])
371371

372372
函数作为类型到底有什么好处呢?那就是可以把这个类型的函数当做值来传递,请看下面的例子
373373

0 commit comments

Comments
 (0)