Understanding Go's typing system is a critical step to mastering all levels of Go development. This chapter will show some examples of converting between data types, working with very big numbers, working with currency, using different types of encoding and decoding, including Base64 and gob, and creating custom collections using closures. In this chapter, the following recipes will be covered:
- Converting data types and interface casting
- Working with numeric data types using math and math/big
- Currency conversions and float64 considerations
- Using pointers and SQL NullTypes for encoding and decoding
- Encoding and decoding Go data
- Structure tags and basic reflection in Go
- Implementing collections using closures