Reflection in Go


  • object with various methods that return info about the type of the var


  • not all vars have name (type), for example slices and pointers don’t but a user defined struct like Foo has a name of Foo


  • a Foo struct would have a type of Foo and a kind of struct; the kind is what the type is made of: struct, pointer, slice etc


  • the contained type in the case of slices and arrays, maps, channels and pointers