Expert Solutions for Commonly Needed Go Tasks
Sau Sheong Chang

#Go
#Cookbook
#JSON
#CSV
#Data_Structure
Go is an increasingly popular language for programming everything from web applications to distributed network services. This practical guide provides recipes to help you unravel common problems and perform useful tasks when working with Go. Each recipe includes self-contained code solutions that you can freely use, along with a discussion of how and why they work. Programmers new to Go can quickly ramp up their knowledge while accomplishing useful tasks, and experienced Go developers can save time by cutting and pasting proven code directly into their applications.
Recipes include:
Table of Contents
Chapter 1. Getting Started Recipes
Chapter 2. Module Recipes
Chapter 3. Error Handling Recipes
Chapter 4. Logging Recipes
Chapter 5. Function Recipes
Chapter 6. String Recipes
Chapter 7. General Input/Output Recipes
Chapter 8. CSV Recipes
Chapter 9. JSON Recipes
Chapter 10. Binary Recipes
Chapter 11 . Date and Time Recipes
Chapter 12. Structs Recipes
Chapter 13. Data Structure Recipes
Chapter 14. More Data Structure Recipes
Chapter 15. Image-Processing Recipes
Chapter 16. Networking Recipes
Chapter 17. Web Recipes
Chapter 18. Testing Recipes
Chapter 19. Benchmarking Recipes
Go has been around for more than 10 years. It was publicly announced in 2009, and version 1.0 was released in March 2012. Since 2013 it has gained a steady rise in popularity and is frequently listed among the top 10 most popular programming languages in use today. In the past 10 years there have been plenty of books written about Go, including Go Web Programming, which I wrote in 2015. Most of what needs to be written about Go has already been written; however, the language continues to evolve, and there are new generations of would-be Go programmers coming on board.
This book came about because of a podcast interview. In September 2021, in the middle of the pandemic, Natalie Pistunovich hosted a “Go Time” podcast interview, titled “Books that Teach Go,” with my friend, Bill Kennedy, and me regarding our Go books. I spoke about Go Web Programming and my new blog site, Go Recipes, which teaches readers how to do the basic stuff with Go. I wanted to provide a steady stream of know-how to serve as a guide for both would-be and experienced Go programmers.
After the podcast, Natalie mentioned that, coincidentally, O’Reilly was looking for someone to write a Go cookbook. Since I already had been writing Go recipes, I thought it was too much of a fateful encounter to ignore. Natalie put me in contact with O’Reilly, and the rest became history (and is now part of the Preface)!
This cookbook, like many others, is not about teaching new or specific topics but instead explains the basics of common tasks. It covers as much ground as possible on what programmers are most likely to use. The coverage is wide, rather than comprehensive. Each recipe is, more or less, standalone; although at times I cite other recipes, it is not necessary to reference them. You may find some recipes either boring or simple, but there are plenty to choose from!
Chang Sau Sheong has been in the software development industry for more than 26 years, and has been involved in building software products in many industries and using various technologies. He is an active member of the software development communities for Java, Ruby previously and now focuses mostly on Go, running meetups and giving talks in conferences all around the world. He also runs the GopherCon Singapore, one of the largest community-led developer conferences in Southeast Asia, and has been doing so since 2017. Sau Sheong has written 4 programming books, 3 in Ruby and the last one in Go -- Go Web Programming.









