Customers who viewed this item also viewed
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Learning Go: An Idiomatic Approach to Real-World Go Programming 2nd Edition
Purchase options and add-ons
Go has rapidly become the preferred language for building web services. Plenty of tutorials are available to teach Go's syntax to developers with experience in other programming languages, but tutorials aren't enough. They don't teach Go's idioms, so developers end up recreating patterns that don't make sense in a Go context. This practical guide provides the essential background you need to write clear and idiomatic Go.
No matter your level of experience, you'll learn how to think like a Go developer. Author Jon Bodner introduces the design patterns experienced Go developers have adopted and explores the rationale for using them. This updated edition also shows you how Go's generics support fits into the language.
This book helps you:
- Write idiomatic code in Go and design a Go project
- Understand the reasons behind Go's design decisions
- Set up a Go development environment for a solo developer or team
- Learn how and when to use reflection, unsafe, and cgo
- Discover how Go's features allow the language to run efficiently
- Know which Go features you should use sparingly or not at all
- Use Go's tools to improve performance, optimize memory usage, and reduce garbage collection
- Learn how to use Go's advanced development tools
- ISBN-101098139291
- ISBN-13978-1098139292
- Edition2nd
- PublisherO'Reilly Media
- Publication dateFebruary 20, 2024
- LanguageEnglish
- Dimensions7 x 1 x 9 inches
- Print length491 pages
Frequently bought together

Deals on related products
Customers also bought or read
- Concurrency in Go: Tools and Techniques for Developers
Paperback$46.76$46.76FREE delivery Wed, Apr 29 - Mastering Go: Leverage Go's expertise for advanced utilities, empowering you to develop professional software
Paperback$41.90$41.90FREE delivery Fri, May 1 - Cloud Native Go: Building Reliable Services in Unreliable Environments
Paperback$44.07$44.07FREE delivery Wed, Apr 29 - Kubernetes: Up and Running: Dive into the Future of Infrastructure
Paperback$43.99$43.99FREE delivery Wed, Apr 29 - Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems#1 Best SellerMySQL Guides
Paperback$59.99$59.99FREE delivery Wed, Apr 29 - Fundamentals of Software Architecture: A Modern Engineering Approach#1 Best SellerComputer Programming Logic
Paperback$57.40$57.40FREE delivery Wed, Apr 29 - Distributed Services with Go: Your Guide to Reliable, Scalable, and Maintainable Systems
Paperback$43.35$43.35FREE delivery Wed, Apr 29 - AI Engineering: Building Applications with Foundation Models#1 Best SellerMachine Theory
Paperback$57.19$57.19FREE delivery Wed, Apr 29 - Database Internals: A Deep Dive into How Distributed Data Systems Work
Paperback$36.33$36.33FREE delivery Wed, Apr 29 - Learning OpenTelemetry: Setting Up and Operating a Modern Observability System
Paperback$30.60$30.60Delivery Wed, Apr 29 - Observability Engineering: Achieving Production Excellence
Paperback$36.49$36.49FREE delivery Wed, Apr 29 - Building Microservices: Designing Fine-Grained Systems
Paperback$44.49$44.49FREE delivery Wed, Apr 29 - Zero To Production In Rust: An introduction to backend development
Paperback$49.99$49.99FREE delivery Wed, Apr 29 - The Staff Engineer's Path: A Guide for Individual Contributors Navigating Growth and Change
Paperback$26.39$26.39Delivery Wed, Apr 29 - Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices
Paperback$37.10$37.10FREE delivery Wed, Apr 29 - The Pragmatic Programmer: Your Journey To Mastery, 20th Anniversary Edition (2nd Edition)#1 Best SellerSoftware Testing
Hardcover$41.64$41.64FREE delivery Wed, Apr 29 - Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud
Paperback$15.44$15.44Delivery Wed, Apr 29 - Software Architecture: The Hard Parts: Modern Trade-Off Analyses for Distributed Architectures#1 Best SellerSoftware Design Tools
Paperback$39.99$39.99FREE delivery Wed, Apr 29 - Terraform: Up and Running: Writing Infrastructure as Code
Paperback$42.87$42.87FREE delivery Wed, Apr 29 - Go for DevOps: Learn how to use the Go language to automate servers, the cloud, Kubernetes, GitHub, Packer, and Terraform
Paperback$62.99$62.99FREE delivery Wed, Apr 29 - Event-Driven Architecture in Golang: Building complex systems with asynchronicity and eventual consistency
Paperback$51.99$51.99FREE delivery Wed, Apr 29 - Design Patterns: Elements of Reusable Object-Oriented Software#1 Best SellerObject-Oriented Design
Hardcover$31.92$31.92Delivery May 3 - 7 - Systems Performance (Addison-Wesley Professional Computing Series)#1 Best SellerComputer Performance Optimization
Paperback$65.95$65.95FREE delivery Wed, Apr 29
From the brand
-
Explore more Go resources
-
More From O'Reilly
-
Sharing the knowledge of experts
O'Reilly's mission is to change the world by sharing the knowledge of innovators. For over 40 years, we've inspired companies and individuals to do new things (and do them better) by providing the skills and understanding that are necessary for success.
Our customers are hungry to build the innovations that propel the world forward. And we help them do just that.
From the Publisher
From the Preface
Who Should Read This Book
This book is targeted at developers who are looking to pick up a second (or fifth) language. The focus is on people who are new to Go. This ranges from those who don’t know anything about Go other than it has a cute mascot, to those who have already worked through a Go tutorial or even written some Go code. The focus for Learning Go isn’t just how to write programs in Go; it’s how to write Go idiomatically. More experienced Go developers can find advice on how to best use the newer features of the language. The most important thing is that the reader wants to learn how to write Go code that looks like Go.
Experience is assumed with the tools of the developer trade, such as version control (preferably Git) and IDEs. Readers should be familiar with basic computer science concepts like concurrency and abstraction, as the book explains how they work in Go. Some of the code examples are downloadable from GitHub, and dozens more can be tried out online on The Go Playground. While an internet connection isn’t required, it is helpful when reviewing executable examples. Since Go is often used to build and call HTTP servers, some examples assume familiarity with basic HTTP concepts.
While most of Go’s features are found in other languages, Go makes different tradeoffs, so programs written in it have a different structure. Learning Go starts by looking at how to set up a Go development environment, and then covers variables, types, control structures, and functions. If you are tempted to skip over this material, resist the urge and take a look. It is often the details that make your Go code idiomatic. Some of what seems obvious at first glance might actually be subtly surprising when you think about it in depth.
Editorial Reviews
About the Author
Currently, he is a Staff Engineer at Datadog, leading the effort to simplify onboarding for their APM product. Previously, Jon was a Senior Distinguished Engineer at Capital One, working on tech commercialization, open source, testing, the semantic engine that provides payment page detection and population for Capital One's Eno browser extension (www.capitalone.com/applications/eno/virtualnumbers), and improving support for virtual credit card numbers inside of Capital One.
Jon is a frequent speaker at Go conferences, and his blog posts on Go and software engineering have been read by more than 150,000 people. He is the creator of the Proteus data access library (github.com/jonbodner/proteus) and co-developer of checks-out, a fork of the LGTM project (github.com/capitalone/checks-out).
Product details
- Publisher : O'Reilly Media
- Publication date : February 20, 2024
- Edition : 2nd
- Language : English
- Print length : 491 pages
- ISBN-10 : 1098139291
- ISBN-13 : 978-1098139292
- Item Weight : 1.8 pounds
- Dimensions : 7 x 1 x 9 inches
- Best Sellers Rank: #95,709 in Books (See Top 100 in Books)
- #6 in Web Services
- #24 in Introductory & Beginning Programming
- #30 in Cloud Computing (Books)
- Customer Reviews:
About the author

Discover more of the author’s books, see similar authors, read book recommendations and more.
Products related to this item
Customer reviews
- 5 star4 star3 star2 star1 star2 star79%17%4%0%0%0%
- 5 star4 star3 star2 star1 star1 star79%17%4%0%0%0%
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Generated from the text of customer reviewsSelect to learn more
Reviews with images
O'Reilly never lets me down!
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on March 8, 2026Format: PaperbackVerified PurchaseExcellent book that really goes down to the metal of the language. No complaints.
- Reviewed in the United States on August 8, 2025Format: PaperbackVerified PurchaseI've been using this book to learn Go programming as a complete beginner for over a month. I love how the chapters are presented, the fact that things a referenced clearly, the examples throughout chapters and so far, the overall structure. I like the fact that there are practice exercises at the end of the chapters, but I feel like there could be more per chapter.
One of the biggest things is the fact that there are times where Jon includes use-cases some certain topics. I've attended too many trainings and read too many topics in IT where they just teach you everything under the sun but when you start working in it, you realize that a lot of isn't necessary from an application perspective, and it would've been good to learn it still but understand its practicality. This book has it where it's necessary.
Highly recommend it for anyone now getting into Go or for anyone already familiar with Go, to use as a reference.
- Reviewed in the United States on May 31, 2024Format: PaperbackVerified PurchaseThis is the best overview of Golang out there. If you want to learn the ins and outs of Go, and how to make sure your code is IDIOMATIC and understandable to other go devs, this is the book for you.
The author walks you through various Go features and syntax, comparing it with similar features in other languages and noting the differences. He even explains how certain features work before telling you to never use them in your own code haha. It's really valuable to not only learn all the capabilities of the latest version of Go, but to also get direction by an experienced user on what should be preferred and what should be avoided. That's where this book shines.
The latest edition adds exercises at the end of each chapter too, and that's so helpful for getting some of this stuff into your brain.
Highly recommend this for any programmer who wants to dip their toes in the world of Gophers, and enjoys learning things in depth from a textbook.
5.0 out of 5 starsThis is the best overview of Golang out there. If you want to learn the ins and outs of Go, and how to make sure your code is IDIOMATIC and understandable to other go devs, this is the book for you.O'Reilly never lets me down!
Reviewed in the United States on May 31, 2024
The author walks you through various Go features and syntax, comparing it with similar features in other languages and noting the differences. He even explains how certain features work before telling you to never use them in your own code haha. It's really valuable to not only learn all the capabilities of the latest version of Go, but to also get direction by an experienced user on what should be preferred and what should be avoided. That's where this book shines.
The latest edition adds exercises at the end of each chapter too, and that's so helpful for getting some of this stuff into your brain.
Highly recommend this for any programmer who wants to dip their toes in the world of Gophers, and enjoys learning things in depth from a textbook.
Images in this review
- Reviewed in the United States on March 24, 2026Format: KindleVerified PurchaseIt’s hard to put my finger on why this book was great.
Maybe it was Bodner’s unexpected sense of humor in the middle of a technical discussion.
Maybe it was the realization that by the end I could write simple algorithms in a new language.
Maybe it was that I read the whole thing, did most of the exercises, and yet I couldn’t fathom all the things he taught me.
Maybe it’s the satisfaction that even if AI would write most of what he said, I would at least understand it now.
Maybe it was all of the above.
- Reviewed in the United States on March 26, 2025Format: PaperbackVerified PurchaseBodner does a great job breaking down Go’s core features and its idiomatic practices, making it accessible for both beginners and experienced developers alike.
One area where the book could be improved is in covering database operations. While the book does an excellent job with many other practical aspects of Go development, a chapter dedicated to working with databases would have been a nice addition
- Reviewed in the United States on April 18, 2024Format: PaperbackVerified PurchaseThe author does a very nice job of discussing all the features of Go, the good and the bad. I read about a third of this book before storing it away on my bookshelf. This is not a reflection on the book's content but simply that there are too many "watch out for this", "don't do this", "this is a common error", and "the compiler won't check for this" aspects of Go that convinced me to avoid this language. There may someday be a Go: The Good Parts book but, until then, if you need to learn Go then I think this is an excellent book that will help you produce the best code possible.
- Reviewed in the United States on October 4, 2024Format: PaperbackVerified PurchaseHaving written Go full-time for over a year, I picked up the book to get some tips and pointers. The book goes into exactly the right level of detail I was looking for, and it even points to several blog posts and books, which worked as great starting points for learning even more.
- Reviewed in the United States on January 25, 2024Format: KindleVerified PurchaseI enjoyed the first edition, and this second edition is an improvement on an already great book on Go. Coverage of the concepts is thorough without being difficult to get through, an underrated thing in technical books. I also enjoyed the addition of exercises in the 2nd version.
Top reviews from other countries
Davino JuniorReviewed in Brazil on November 3, 20255.0 out of 5 stars Awesome book, highly recommended
Format: KindleVerified PurchaseAwesome book, highly recommended. It goes through all core parts of the language and provide concrete examples on idiomatic Go!
Victor RicartReviewed in Sweden on March 26, 20245.0 out of 5 stars Great intro
Format: PaperbackVerified PurchaseGreat book, particularly liked that it shares information about the memory layout, garbage collection and why the code suggested is indeed idiomatic to Go. I got the book as I am picking up the language for a new project at work.
Tùng NèReviewed in Australia on April 12, 20255.0 out of 5 stars Informative and insightful
Format: PaperbackVerified PurchaseHighly recommended for someone know how to program and want to pick up Go. Not a deal breaker, but I wish it is typo-free.
-
fibinaciReviewed in the Netherlands on May 31, 20241.0 out of 5 stars Deze beoordeling gaat alleen over de "Print kwaliteit" boek is ontzettend slecht.
Format: PaperbackVerified PurchaseDeze beoordeling gaat alleen over de "Print kwaliteit" van het boek dit is ontzettend slecht.
Was de inkt op?
Zeker voor deze prijs inhoud moet ik nog lezen om daar een oordeel over tegeven.
MarxoneReviewed in Germany on January 27, 20265.0 out of 5 stars Nice book
Format: PaperbackVerified PurchaseThe print ink is nice so is the cover.




















