iswbm / GolangCodingTime

Go编程时光,一个零基础入门 Golang 的教程

Home Page:http://golang.iswbm.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

c02/c02_07

utterances-bot opened this issue · comments

2.7 学习反射:反射三定律 — Go编程时光 1.0.0 documentation

https://golang.iswbm.com/c02/c02_07.html

fmt.Println("v2 Type: ", v1.Elem())

请问v1的type为啥是字符串的值啊?

不知道怎么回复,应该是这样输出type的,而且你的debug的串口应该能看到两个都是reflect.value

fmt.Printf("v2 Type: %T\n", v1.Elem())

好的,谢谢您