Introduction
About this Book
Go (or GoLang) is a modern programming language originally developed by Google that uses high-level syntax similar to scripting languages. It is popular for its minimal syntax and innovative handling of concurrency, as well as for the tools it provides for building native binaries on foreign platforms.
All of the chapters in this book are written by members of the Gopher Guides team. Individually, each team member is engaged with their local software development communities with hosting and organizing meetups and conferences. Collectively, the Gopher Guides Team is committed to educating Go developers, and fostering an inclusive and supportive global community of developers that welcomes beginners and experts alike.
Motivation for this Book
Many books and other educational resources about Go rely on building progressively more complex examples to illustrate concepts like composition, testing, and packaging. This book explores various Go topics with clear, self-contained example code.
Structuring the book this way means that the examples in each chapter are concise and specific to the topic of the chapter. For those who are starting out learning about Go, the chapters are ordered in a way that should guide you from a beginning “Hello, World” program all the way to parsing command line flags with your programs.
For more experienced programmers who would like to use this book as a reference, or readers who like to choose what to focus on, this approach of loosely related chapters also means that you can skip between chapters to learn about particular concepts that interest you without missing out on context from preceding chapters.
Learning Goals and Outcomes
This book starts with chapters on how to set up and configure a local Go development environment. It ends with chapters that explain how to build your Go programs with conditional imports to target specific operating systems, and a final chapter on parsing command line flags to help you build your own utilities.
By the end of this book you will be able to write programs that use conditional logic with switch statements, define your own data structures, implement interfaces to reuse portions of your code, and write custom error handling functions.
These examples are just a small sample of the topics that are covered in the book. We hope that you continue learning about Go once you are finished reading it. Go is a fun, powerful language that is gaining in popularity. We also hope that this book enables you to become a more productive Go programmer, and that it helps you learn how to build useful software with Go for yourself or others.