study notes

Reflection in Golang Incase you are here looking to learn about reflection, a better resource is Interfaces in Go are types which hold concrete value and underlying type of the value with a precondition that value should implement methods of the interface. For example; types implementing Read([]byte) (int, error) method satisfy the io.Reader interface. However interface{}, without any method definition will match all types. A struct type can be assigned to an empty interface, the assertion is the concrete type should implement the methods of the interface type.