From e2ccb8f8cac26f7ed896363b799424e60ae8b375 Mon Sep 17 00:00:00 2001 From: guozhiwei <346106179@qq.com> Date: Wed, 20 Feb 2013 15:14:07 +0800 Subject: [PATCH] Update 02.3.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 多了一个[ --- 02.3.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 [, ...]) 函数作为类型到底有什么好处呢?那就是可以把这个类型的函数当做值来传递,请看下面的例子