We've used Go to power web sites, API sites, worker processes, services, mobile applications, command-line tools and more. Learn what works, what doesn't, and how to get the most from Go's concurrency features.
Along side the instructional text, you'll find examples culled from real-world projects. Learn from our mistakes, profit from our success.
Buy the book now and get frequent updates as we finish each chapter. Contribute suggestions, corrections, advice, and more to the Author Forum.
Learn how to organize your projects and make sense of your GOPATH.
See how to use goroutines and channels to get more out of your servers' hardware.
Get the most out of the great tools that ship with Go.
Use profiling tools to squeeze every last big of performance out of your code.
Find out how to use Go's unique interfaces to write less code.
Make sure your code does what it advertises. Use Go's benchmark functionality to avoid performance regressions.
Get a taste of what's in store for you with these sample pages.
Computers have evolved, but programming languages haven't kept the same pace of evolution. The cell phone you carry probably has more CPU cores than the first computer you used. High powered servers now have 64, 128, or even more cores, but we're still programming for them in the same ways we were when there was just one core.
The art of programming has evolved too. Most programs aren't written by a single developer any more, they're written by teams of people sitting in different time zones, working at different times of the day. Large projects are broken up into smaller pieces and assigned to programmers who then deliver their work product back to the team in the form of a library or package that can be used across an entire suite of programs.
Today's programmers and companies believe more and more in the power of Open Source Software. Go is a programming language that makes sharing code easy. Go ships with tools that make it simple to use packages written by others, and Go makes it easy to share your own packages too.
In this chapter you'll see why Go is different from other programming languages. Go rethinks the traditional Object Oriented development you might be used to while still providing an efficient means for code reuse. Go makes it easier for you to effectively use all of the cores on your expensive server, and Go takes away the penalty of compiling a very large project.
As you read this chapter, you'll get a feeling for the many decisions that shaped the creation of Go, from its concurrency model to its lightning fast compiler. You'll appreciate the tools that ship with Go to make your life as a developer easier. You'll see why so many developers are choosing Go when they start up that new project.
Go has its own elegance and programming idioms which make the language very productive and fun to code in. In this chapter we will explore the syntax and programming structure of Go. If you are familiar with the C programming language or other derivatives, you will see a lot of similarities.
The Go language designers set out to create a programming language that would let them be productive without losing access to the lower level programming constructs they needed. This balance is achieved through a minimized set of keywords, built-in functions and minimized syntax. Go also provides a very comprehensive standard library. The standard library provides all the core packages programmers need to build real world, web and network based applications.
When we are done with this chapter, you will have a general overview of the Go language. We will familiarize ourselves with the general structure, style and syntax of the language. We will explore small coding examples that will provide an overview on variables, types, control structures, functions and error handling. All the things that make Go unique, productive and fun.
Our book has an Author Online Forum where you can ask questions, provide feedback, and help shape the final content.purchase
Enjoyed reading it. Looking forward to more.
To say it out loud: I am extremely impressed! I think this is one of THE best early-stage manuscripts I have seen. I think the authors do a tremendous job of presenting their material: clear, short, extremely to the point, no fluff (like Go itself!). No hype, either – what a relief!
People know about Go, but I don't think much has been written about it. And (based on what I have seen), this book would provide a tremendous “crash course” for intermediate to advanced programmers, who quickly want to get the gist of Go.
Covers a broad range of topics from language details to programming environment/ease-of-use features, ideal for someone with existing programming experience wanting to learn about Go.
"So far Go in Action is one of the best written language books i've ever read"
Brian has been using Go in production since 2010. Working as the CIO of a credit bureau, Brian created the Skynet project to help move a monolithic Rails project into smaller, easier to maintain Go services. Brian's Go projects service several million API requests per day. @bketelsen
Erik created many of the projects that evolved out of Skynet, most notably SkyDNS. Erik has been a full-time Go developer since 2011. Previously, Erik worked on large web projects like Disney's online reservation system. @erikstmartin
William Kennedy is a managing partner at Ardan Studios in Miami, FL, a mobile
and web app development company. Bill is also the author of the blog GoingGo.Net and the
organizer for the Go-Miami and Miami MongoDB
meetups in Miami. Bill has been a software developer for over two decades developing back end systems in C, C++ and C# for the
call center, gaming and financial industries. Bill looked for a new language in 2013 that would allow him to develop back end
systems in Linux and found Go. He has never looked back. He has been married since 2005 and he and his wife enjoy their five kids,
four cats, one dog and all the wild animals who have found a home on the Kennedy compound.
You can reach Bill on Twitter at @goinggodotnet