Programmer's guide to idiomatic and testable code
  • July 2025
  • ISBN 9781617299896
  • 336 pages
  • printed in black & white
  • Available translations: Korean, Russian, Simplified Chinese

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


pBook available Aug 12, 2025
ePub + liveBook available Aug 12, 2025
Look inside
Go beyond Go syntax into the language’s unique perspective on program design.

Through engaging hands-on examples, Go by Example will teach you to think differently about programming in Go. You’ll get to grips with the “Go mindset”, writing code that’s simple, straightforward, and easy to understand for your fellow Go developers. You’ll discover how Go’s tooling helps you write code that’s robust and testable, and see just how productive you can be with Go's rich set of built-in packages.

In Go by Example you will learn how to:

  • Understand what makes Go different and adopt its philosophy for simple, pragmatic, and straightforward code
  • Write idiomatic code that’s robust, efficient, maintainable, and inherently testable by design
  • Identify common Go mistakes and apply proven patterns for higher quality code
  • Structure and organize effective Go packages and APIs
  • Build performant concurrent programs with Go’s unique concurrency

Go by Example explores what makes Go so dramatically different from other languages. Through hands-on and realistic project examples—like command-line tools, web services, and scalable concurrent programs—it helps experienced developers unlearn habits and quickly become productive in crafting truly Go-like, high-quality code.

about the technology

You can’t appreciate the simplicity, explicitness, and pragmatism of Go until you see it with your own eyes! Even a quick glance at an elegant interface or a bit of clean error handling code reveals why Go was the language of choice for Kubernetes, Docker, and Terraform.

about the book

Go by Example unpacks real Go programs to highlight the language features and idiomatic coding practices used by the pros. In it, you’ll dissect and explore examples of command-line tools, concurrent programs, web services, and more as you learn to write Go code that’s simple, efficient, and testable.

what's inside

  • Acquire the “Go mindset”
  • Write idiomatic, reliable, and maintainable code
  • Structure Go projects and packages
  • Best practices and antipatterns

about the reader

For experienced programmers.

about the author

Inanc Gumus is a veteran programmer who has specialized in Go since 2012. Inanc has educated over 100,000 developers through his social presence, GitHub repositories, online courses, and his popular blog.

Teaches you all the important bits using realistic code.

Mat Ryer, Grafana Labs

A goldmine of practical examples and insightful explanations.

Paul Snow, JDR Software

Covers modern Go features thoughtfully, weaving them into solutions as natural parts of well-crafted code.

Kemal Akkoyun, Datadog

Invaluable for anyone wishing to take their Go coding to the next level.

Barnaby Norman, Direct Corporate Clothing Limited

Complete, practical and clear Go knowledge in a pill!

Bartłomiej Płotka, Google
choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • Go by Example ebook for free
choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • Go by Example ebook for free