1 Warming up

 

This chapter covers

  • Goals of the book
  • Importance of code design and testability
  • Bird-eye's view introduction to Go

This chapter will show you what Go offers from a bird's eye view and how it is different from other languages. Throughout the book, I will help you design and test maintainable code in Go. Go is a tiny and straightforward language. But don't let that fool you; you are standing on the shoulders of giants before you. To achieve simplicity, a lot of thought went into its design mechanics. Behind the scenes, Go is a complex language with many moving parts, but it deliberately chooses to hide that complexity behind simple interfaces.

1.1 Goals of the book

I wrote this book for intermediate-level programmers who have recently learned how to program with Go. Go has distinct design idioms and mechanics and will bite you if you fight with the language and write code as you do in other programming languages. So you cannot write well-designed code without a proper understanding of how Go approaches program design.

Let's imagine you're a Java programmer. You heard that Go is fast, reliable, cross-platform, comes with great tooling, out-of-the-box libraries, and at the same time easy to learn and use. So, you decided to port one of the command-line tools you had written from Java to Go. Just the correct type of person for this book!

1.1.1 Well-Designed code

 

1.1.2 Testable code

 

1.2 A brief tour of Go

 

1.2.1 Motivations

 
 
 
 

1.2.2 What can you do with Go?

 
 
 

1.2.3 The reasons behind Go's success

 
 

1.2.4 Type system

 
 

1.2.5 Concurrency

 

1.3 Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest