This document discusses changes and improvements to reflection in Go 1.7. It provides examples of using reflection to dynamically declare anonymous structs, check if a value implements an interface, and get struct field tags. It emphasizes that reflection should only be used when necessary, and otherwise standard interfaces and types are preferred.
26. • reflect.Type/Value usually requires a value to create
• But if you don’t want to create a variable just to create
an interface reflect.Type…
• Create a nil pointer, then dereference it!
reflect.TypeOf((*Maybe)(nil)).Elem()