golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.72k stars 17.62k forks source link

reflect: Add UnderlyingType(reflect.Type) #8502

Open ugorji opened 10 years ago

ugorji commented 10 years ago
The go spec refers to the underlying type of a given type T:

Each type T has an underlying type: If T is one of the predeclared boolean, numeric, or
string types, or a type literal, the corresponding underlying type is T itself.
Otherwise, T's underlying type is the underlying type of the type to which T refers in
its type declaration.

Discussion: https://groups.google.com/d/msg/golang-nuts/BJEuegjQtEA/q2S3b6JxY1MJ
ianlancetaylor commented 10 years ago

Comment 1:

Labels changed: added repo-main, release-none.