nil的底层实现在源码中为: ```go // nil is a predeclared identifier representing the zero value for a // pointer, channel, func, interface, map, or slice type. var nil Type // Type must be a pointer, channel, func, interface, map, or slice type // Type is here for the purposes of documentation only. It is a stand-in // for any Go type, but represents the same type for any given function // invocation. type Type int ``` 在源码中好像是int类型? 我的疑惑是nil在实际使用中是有类型区分的,可以把nil转换为不同类型的nil。那nil是接口类型还是int类型? 如果接口类型他的data,type是什么内容呢?如果是int类型底层实现又是如何呢?
有疑问加站长微信联系(非本文作者)
