Update main.go

Added the rest of the example code for chapter 2.3