diff --git a/02.3.md b/02.3.md index 37ca43c4..7ca65eb7 100755 --- a/02.3.md +++ b/02.3.md @@ -367,7 +367,7 @@ Go语言中有种不错的设计,即延迟(defer)语句,你可以在函 在Go中函数也是一种变量,我们可以通过`type`来定义它,它的类型就是所有拥有相同的参数,相同的返回值的一种类型 - type typeName func(input1 inputType1 [, input2 inputType2 [, ...]) (result1 resultType1 [, ...]) + type typeName func(input1 inputType1 , input2 inputType2 [, ...]) (result1 resultType1 [, ...]) 函数作为类型到底有什么好处呢?那就是可以把这个类型的函数当做值来传递,请看下面的例子