Jump to ratings and reviews
Rate this book

Learning Go: An Idiomatic Approach to Real-World Go Programming

Rate this book
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

491 pages, Paperback

Published February 20, 2024

About the author

Jon Bodner

1 book17 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
188 (53%)
4 stars
139 (39%)
3 stars
18 (5%)
2 stars
3 (<1%)
1 star
2 (<1%)
Displaying 1 - 30 of 45 reviews
Profile Image for Yuri Bilyk.
15 reviews1 follower
May 31, 2021
Would recommend this one over the classic one, as it gives much more insight on a way real programs are written. The explanations are clear and concise, without diving too deep into the details.

It will probably not teach you programming, but if you have couple of languages under your belt, you will not need more.
Profile Image for Mohsen.
118 reviews25 followers
February 18, 2022
هدف کتاب همون‌طور که از عنوانش بر میاد اینه که چطور طبیعی و «فصیح» با گو کد بزنیم؛ (در مقابل این که عادت‌هامون از یه زبون دیگه رو وارد گو کنیم و صرفا سینتکس گو رو استفاده کنیم) برای رسیدن به این هدف، علاوه بر معرفی ویژگی‌های مختلف زبان، خیلی جاها فکر پشت طراحی اون ویژگی رو هم بررسی می‌کنه و خوبی‌ها و بدی‌هاش رو میگه. (حتی در فصل آخر، ژنریک‌ها که قراره در ورژن بعدی به زبان اضافه بشوند رو هم بررسی می‌کنه که به چه صورت اضافه میشن و چرا بعضی ویژگی‌های ژنریک تو بقیه زبان‌ها رو نداره) در نتیجه علاوه بر آشنایی با گو، از رویکرد مهندسی نرم‌افزار هم کتاب جالبیه. البته پیامد این رویکرد اینه که کتاب نسبتا پیشنیازهای زیادی میخواد و هرچند به آشنایی قبلی با زبان گو تقریبا نیاز نداره ولی به آشنایی خوبی با نرم‌افزار به صورت کلی می‌طلبه
Profile Image for Diana Pojar.
162 reviews152 followers
December 20, 2021
Really good book for getting to know some of the GO fundamentals. This was part of a team bookclub and even the folks experienced in Go, still learnt a few new things, which is great. I also enjoyed some of the sprinkled humorous bits that were here and there.
Profile Image for Jeethu Rao.
8 reviews2 followers
September 23, 2021
This book is a good intro to golang for people who have prior experience with more than one programming languages. Or, for people like me, who've touched golang in the distant past, but have forgotten about it.
Profile Image for Max Wolffe.
191 reviews13 followers
July 21, 2021
This is a great introduction to Go for those with some existing programming experience.

Bodner covers the basics very quickly and then focuses on the aspects of Go which may be tricky to the target audience. I particularly appreciated the opinionated advice - from passing of arguments (e.g. should one use a pointer or a struct directly?), tooling (editor recommendations, 3rd party libraries, etc), to patterns for concurrency (done/cancel channels, when to use buffered channels, etc). These are patterns which are common in open source projects which I didn't fully grok the usage of before reading this book. I also appreciate just how up to date this book is (at time of reading in 2021), which is important for an ecosystem as fast moving as Go's.

My only complaints with the book are:
- There are no practice problems. This is an issue with a lot of O'Reilly books, but I find learning via doing much more effective than passively consuming the content. I appreciate that the examples used in the text are available for the reader to run themselves, but I do wish that there were just a handful of practice problems at the end of each chapter to help the reader test their knowledge. I'm coming from the other extreme of this (Functional Programming in Scala - https://www.goodreads.com/en/book/sho...) which almost certainly has too many exercises, so the absence here was particularly notable.
- Somewhat inconsistent use of Go Playground vs GitHub (This is mainly because some features are not supported on Go Playground - but I wish they'd just been consistent and put everything on GitHub)

Overall - strong recommend for folks new to Go.
Profile Image for Allisonperkel.
808 reviews38 followers
November 13, 2021
Easily one of the best books on how to think about writing software. You’ll also learn Go but really this book teaches you how to think.

Full disclosure, I work with author which is cool as I heard his voice in my head while I read this book.
Profile Image for Vinicius Souza.
49 reviews1 follower
November 5, 2022
The best book on Go I've ever read. It is a very pleasant and fluid read. It brings all the "beginners" topics, like types, loops, structs, etc, and, also, more advanced topics, such as concurrency, memory management (the best explanation I've read for why not to use pointers everywhere) and tooling. Besides the Go language, it also teaches you some general programming concepts, like tests, concurrency issues and some web programming. If you are an experienced programmer and need to learn Go, this is the book for you.

It is good to mention that, for today, it is quite up to date, including even the recent generics feature.
Profile Image for Stephen.
Author 7 books13 followers
February 22, 2022
This was a good overview of how to write idiomatic go. I found it useful as a reference for things I needed to lookup and a good way to discover things that I didn’t realize were useful. While much of what’s here could be found in other sources (like the Effective Go site), Bodner’s approach is a good way to get started.
3 reviews
October 11, 2021
A great introduction to Go. You will get the most out of this book if you already have some prior experience with another programming language.
10 reviews1 follower
June 1, 2024
"Learning Go" by Jon Bodner is an exemplary guide for anyone looking to master the Go programming language, whether you're a seasoned developer or a newcomer to coding. Bodner’s extensive experience and clear understanding of Go shine through in this well-structured and highly informative book.

Content and Structure
The book is meticulously organized, starting with the basics and gradually delving into more complex topics. It begins with a comprehensive introduction to Go's syntax and core concepts, making it accessible for beginners. Each chapter builds upon the previous ones, ensuring a smooth learning curve. The progression from simple to advanced topics is logical and well-paced, which helps maintain the reader's interest and understanding.

Depth of Information
Bodner covers a wide range of topics, including:

Basic syntax and control structures
Data types and their applications
Functions, methods, and interfaces
Concurrency and parallelism
Error handling
Testing and debugging
Best practices and idiomatic Go
Each topic is explained with clarity and depth, supported by practical examples and exercises. The examples are particularly effective, as they are relevant and help reinforce the concepts discussed. Bodner's approach to explaining concurrency, a notoriously difficult subject, is especially commendable for its clarity and thoroughness.

Overall, "Learning Go" is a highly recommended read for its clarity, depth, and practical approach to teaching one of the most powerful and efficient programming languages today.

Profile Image for Chris Austin.
76 reviews8 followers
November 27, 2021
A very well planned introduction to Go that introduces topics in layers that build upon the earlier chapters, while also having some early hints to prep you for those subjects.

There are some aspects of the language that irritate me, but the author did an excellent job of presenting them with enough context that I can see why most of those choices were made (except the date format - pretty sure that one is just using annoyance as a mnemonic). It also made me question some of my assumptions about relative performance, e.g. cost of copying objects and adding to the stack vs cost of heap access.

The signal to noise ratio is also excellent, with no random filler added that I need to skim past (a pet peeve with many books).
March 24, 2022
I could say it was the best book I've read about the golang. Perfect for newbies and people who have some experience with the language. Covers most of corner cases which you wouldn't notice normally and wouldn't read or see somewhere else and you would find out facing a bug.
2 reviews
April 15, 2024
It's great, explains everything in small pice of code examples.
I can read and learn every section independent from other sections.
1 review
May 23, 2022
This is a very good book for the beginner and who wanna has learning experience before. This book has easy to understand. It has vivid examples, with the tips, cautions. After 3 weeks of reading this book. I can apply some knowledge to my work. The knowledge is already updated (Into go ver 1.18), so it is built a very good foundation with the latest knowledge.
One more thing to note, this book has compared Go with other languages like Js, C/C++,... I found that very intesting.
However, this book only covers basic things, and only language only. So that the knowledge may be not applied instantly to work.
Profile Image for Raúl.
59 reviews6 followers
August 14, 2022
I've been programming in Go for the last year and a half, and I still learned things from this book. I'd say it's a pretty good resource if you want to go a bit beyond the Go documentation which is already pretty good. There are a couple of chapters that I found difficult to digest such as Concurrency, and Generics (which at the time of writing hadn't been released) which I skimmed through since I've seen better resources out there.

If you're a beginner in Go, I'd still recommend taking a look at this book. Especially if you're part of the O'Reilly platform since you'll find it available there.
Profile Image for Artur.
1 review
February 10, 2024
As a programmer with a background in JavaScript, I found this book to be an incredibly useful starting point for diving into the Go programming language. It features a well-designed cover and introduces great basic examples that gradually increase in complexity. As the book progresses, some examples become quite challenging, more so than I initially anticipated. However, I still believe it's an excellent choice for beginners looking to get acquainted with Go. The key takeaway for me is the realization that mastering Go will require a lot of practice. Nonetheless, this book has laid a solid foundation for my journey into Go programming.
Profile Image for Yifan Yang.
38 reviews3 followers
August 30, 2024
This book does an excellent job of teaching the idiomatic way of using Go, just as it promises. I believe that learning a new language involves much more than just understanding its syntax. What's more important is grasping critical implementation details (such as the fact that interfaces in Go have both a value and a type, and that slices and maps are implemented with pointers behind the scenes), naming and structural conventions, widely accepted tools, and the idiomatic way of solving problems and more. Based on Go 1.22, the latest version at the time of my reading, this book covers nearly everything I wanted to know when learning a new language. Highly recommend it!
Profile Image for Alexandru Todea.
13 reviews
October 10, 2022
My second book on the topic. The big pro about this book is that author does not only share theory about the language but also highlights an idiomatic way of writing Go. My favourite part is the chapter on pointers, because it shares valuable insights on pointer passing performance, variables to take into consideration when it comes to decide between returning a pointer versus returning a value (counter-intuitively it is slower to share data by pointer dereferencing for data structures that are lower than 1 megabyte.). All in all good theoretical book.
Profile Image for Arun.
193 reviews61 followers
September 9, 2022
I recommend this as a good first book on golang for programmers who already have programming experience in other languages like Python/Ruby/Java/C++. My only gripe is in few places his sentence structure is so misplaced/confusing that I didn't understand his explanations even after multiple re-readings.

Backstory: I am not a big fan of golang but merely had to use it in anger at work. So I decided to learn it properly. This book covers all the details on how to write idiomatic golang which was my primary purpose of reading it.
July 16, 2022
Decent and helpful book, however the chapter about testing is poor. The author introduces all relevant built-in tools regarding testing, however his understanding of testing itself, in general, seems to be defective. The author mixes the terminology and doesn't know how to properly apply test doubles. Other than that - definitely worth reading!
28 reviews
August 23, 2022
Thorough and fairly complete guide to Go language. I wish it had used more mundane examples in its explanations as oppose to jumping straight to the Go source code - that's the only negative that made it hard to get the concepts across sometimes. Regardless, it's still a great book to learn Go from.
1 review
November 13, 2022
Good and comprehensive instructions for Golang

It's easy to understand, it covers lots of important topics in Go, even it includes generic from Go 1.18. if you have finished the "the Go programing language" ,this could be the next one you want to pick.
Profile Image for Kyle.
2 reviews1 follower
January 3, 2023
I found this book to have helpful insights into foundational principles of the Go language. This book was especially useful after having used Go for a time, to help me identify distinct areas where I can improve my implementations based on content discussed.
Profile Image for Kris.
239 reviews14 followers
March 7, 2023
Good intro to the basics of Golang. Missing Generics, but I finally understood pointer types in Golang.

Read 100 Go Mistakes if you want to learn more. Or, some newer Golang book to pick up how Go looks now.

It’s still worth reading.
Profile Image for Dimitry.
12 reviews
May 28, 2024
As a newbie to go this book was very helpful, covered all the topics and many pitfalls that I hadn't heard in the tutorials on youtube. Definitely recommend it if you want to quickly start writing code in Go and it is not your first programming language.
Profile Image for Leam Hall.
Author 6 books8 followers
April 2, 2022
Honestly, some of the stuff was over my head. However, I really enjoy Jon's writing and this is a great book if you're a programmer who wants to quickly get up to speed on solid Go.
Profile Image for Ruslan Diachenko.
69 reviews3 followers
May 8, 2022
Good overview not just language syntax but Go ecosystem and idiomatic approaches in general.
Profile Image for Ethan Swan.
59 reviews
May 26, 2022
A thorough and fair coverage of Go. Not riveting, but can you really expect that?
Displaying 1 - 30 of 45 reviews

Can't find what you're looking for?

Get help and learn more about the design.