Skip to content

Commit bc342b8

Browse files
committed
Merge pull request astaxie#302 from mikulely/patch-5
改进对反射的描述
2 parents 93fb25e + d28ec7b commit bc342b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ebook/02.6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ Go里面真正吸引人的是它内置的逻辑语法,就像我们在学习Str
354354
}
355355

356356
### 反射
357-
Go语言实现了反射,所谓反射就是动态运行时的状态。我们一般用到的包是reflect包。如何运用reflect包,官方的这篇文章详细的讲解了reflect包的实现原理,[laws of reflection](http://golang.org/doc/articles/laws_of_reflection.html)
357+
Go语言实现了反射,所谓反射就是能检查程序在运行时的状态。我们一般用到的包是reflect包。如何运用reflect包,官方的这篇文章详细的讲解了reflect包的实现原理,[laws of reflection](http://golang.org/doc/articles/laws_of_reflection.html)
358358

359359
使用reflect一般分成三步,下面简要的讲解一下:要去反射是一个类型的值(这些值都实现了空interface),首先需要把它转化成reflect对象(reflect.Type或者reflect.Value,根据不同的情况调用不同的函数)。这两种获取方式如下:
360360

0 commit comments

Comments
 (0)