April 2012
Intermediate to advanced
288 pages
4h 39m
English
One of the advantages of a dynamic language is that the internals of the implementation are exposed for your use. This lets you do various metaprogramming things that are much harder in static languages. The go package and its subpackages let you do very complex metaprogramming by transforming the abstract syntax tree of a Go program, but even without going that deep into the implementation there are lots of interesting things that you can do.
8 switch t.Kind() { 9 case reflect.Int, reflect.Uint,10 reflect.Int8, reflect.Int16,11 reflect.Int32, reflect.Int64,12 reflect.Uint8, reflect.Uint16,13 reflect.Uint32, reflect.Uint64, ...
Read now
Unlock full access