Teach

This repositary contains short snippets of code that illustrate noteworthy features of go.

rdInp

This snippet shows how create an interactive input in go.

struct

This snippet shows the use of anonymous fields in go.

unsafe

Snippets that convert (without copying) a byte array (byte slice) into other components.
An example is 4 bytes, That data can be viewed as 4 characters (eb bytes),a int32 number or a uint32 number. The values in the data structure do not change. The interpretation of what these 4 bytes mean can change.

funcTbl

This snippet creates an array of functions. Useful for fast parsing of http requests via a hash function.