Jump to ratings and reviews
Rate this book

Mastering Go: Create Golang production applications using network libraries, concurrency, and advanced Go data structures

Rate this book

Exploring the major features and packages of Go, along with its types and data-structures, enabling the reader to write threadsafe, concurrent cloud, and network applications

Key Features Not your typical introduction to the Golang programming language Exploring Golang cradle to grave, completes the developer’s Golang education A thorough exploration into the core libraries and Golang features, that usually are taken for granted In depth explanation, detailing the rationale behind composite data types, Golang concurrency, and the Golang networking library Book Description

Often referred to as Golang (albeit wrongly), the Go programming language is really making strides thanks to some masterclass developments, architected by the greatest programming minds. Shopify CEO Tobias Lutke has been recently quoted as saying “Go will be the server language of the future.” Go programmers are in high demand, but - more controversially - Go takes the stage where C and Unix programmers previously led the way.

The growth of the Go language has seen it become the means by which systems, networking, web, and cloud applications are implemented. If you’re a Go programmer, you’ll already know some Go syntax and will have written some small projects. However, most Go programmers face the difficulty of having to integrate their Golang skills with production code. With Mastering Go, the author shows you just how to tackle this problem. You'll benefit by mastering the use of the libraries and utilize its features, speed, and efficiency for which the Go ecology is justly famous.

Offering a compendium of Go, the book begins with an account of how Go has been implemented. You'll also benefit from an in-depth account of concurrency and systems and network programming imperative for modern-day native cloud development through the course of the book.

What you will learn Understand the design choices of Golang syntax Know enough Go internals to be able to optimize Golang code Appreciate concurrency models available in Golang Understand the interplay of systems and networking code Write server-level code that plays well in all environments Understand the context and appropriate use of Go data types and data structures Who this book is for

This book is for Golang programmers. You should have previously read an introductory book on Go, or to have worked through the Tour of Go or an equivalent online course. This book will definitely help to remember the basic concepts of concurrency, but network programming will be explained. A certain amount of previous coding and production experience would be helpful.

Table of Contents Go and the Operating System Understanding Go Internals Working with Basic Go Data Types The Uses of Composite Types Enhancing Go Code with Data Structures What You Might Not Know About Go Packages Reflection and Interfaces for All Seasons Telling a Unix System What to Do Go Concurrency – Goroutines, Channels, and Pipelines Go Concurrency – Advanced Topics Code Testing, Optimization, and Profiling The Foundations of Network Programming in Go Network Programming – Building Servers and Clients

606 pages, Kindle Edition

Published April 30, 2018

137 people are currently reading
190 people want to read

About the author

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
27 (28%)
4 stars
33 (35%)
3 stars
28 (29%)
2 stars
5 (5%)
1 star
1 (1%)
Displaying 1 - 12 of 12 reviews
Profile Image for Yiorgos Adamopoulos.
40 reviews11 followers
September 22, 2019
[ This is a copy of my Amazon review ]

I like this book. I really do. I started learning Go reading "The Go Programming Language" which one can view as Go's K&R. But like not everyone can learn from K&R, the same holds for TGPL too. This is the gap that this book closes. You cannot be scared. You can finish the Tour of Go in Golang's web site and then start the book.

Information presented in the book is in small pieces. That is the author's style if you've also read his other book. It helps. You can read it in coffee breaks and write a few lines of the examples, compile, run, test and be happy with the result. You become immediately productive once you've mastered the concepts of the language. By that I do not mean that you magically become a Go expert programmer, but with the book you get a faster pace on the subject that matters to you. You can dive right into it as a junior Go programmer within the first week. Because the presentation style that allows for you to study in small chunks helps you with that. You will never stop halfway through a section because the break is over. You will never type lots of lines before you make an example work.

How do you eat an elephant? By eating one bit at a time. The same with Mastering Go. You master it one section at a time. That is the gift of the book.

Disclaimer: I was gifted the book by the author and the publisher as I relentlessly proof-read and corrected typing errors in his other book.
464 reviews16 followers
May 10, 2020
I've been reading this for months, off-and-on, because I'd been writing some Go stuff and finding it pretty straightforward (and almost nostalgic) but being not really comfortable with my strategies for structuring larger apps with its blend of pseudo-OO interfaces and not-quite-functional-but-also-highly-mutable attitude.

But, like a lot of Packt books, this consists primarily of the author taking some aspect of the topic, writing an isolated chapter on it that's about at the level of what you get from the docs, and not really adding much in the way of insight. This is almost at a cargo cult level at this point.

For instance, you don't want to (in your programming book) put up a wall of code the reader has to struggle through (unless it's just meant to be a full listing you've already covered). So what you do is break up the code bit-by-bit and explain the significance each part. You can even skip parts of the code if they're boilerplate or already covered.

This book presents the entire code every time I think, but then breaks it up this way:

This shows the first part of the code
The next few lines show the next section of the code
And here's the last section of the code

And in a lot of cases, that's all the explanation there is. Sometimes it's because that's all that's needed and others it's probably due to word counts or page quotas or something related to the mechanical process of publishing. But is extraordinarily unenlightening.

The English is otherwise passable (unlike some other Packt books I've read recently) but the number of times I went to the official docs for clarification was very high.

Look, here's the thing: Official docs tend to be very dry and deal with the mechanics of things. You get a book like this to tell you why things are done a certain way, and what problems they might solve. Pointing out that Go has three different data structures in its standard library, and then running through some already fairly intuitive interfaces is not very helpful. We code to solve problems: When you give me an example of a Heap, tell me what problem I might uniquely solve with it.

The interface stuff is especially bad, with interfaces called A and B and instances that are also one letter and demonstrate on a basic level a very minor "this is how you'd do something trivial" but no real depth.

At one point, the author says, hey, if you want to design something OO, you're out of luck. Maybe go use Python. (Another weird side note, we learn he doesn't like Java, apparently, so he wouldn't recommend it. Newsflash: A lot of people don't like Java and that has very little bearing on whether or not it's useful to learn.)

I can only assume the economics of writing tech books in the 21st century is so bad, publishing houses are just luring whomever they can convince to throw words on a page, not really editing either on a language or tech level, and just churning stuff out on every conceivable topic figuring to sucker guys like me into their $10/month plans.
Profile Image for Dmytro Shteflyuk.
53 reviews19 followers
May 16, 2020
A large semi-organized cookbook of different things you can do with Go. Not all the samples are of equal quality (some crash, other just look awful). Overall I can’t even say what is the target audience of this book.
Profile Image for Vlad Bezden.
236 reviews14 followers
August 22, 2019
Good examples and explanation. I also like exercises. I would not recommend this book for beginners. I use this book more for expanding Go knowledge and for looking at examples.
Profile Image for Denis Romanovsky.
215 reviews
June 26, 2020
Just a very good overview of Go language capabilities. Nothing more, nothing less... Go appears quite easy to start and it is very strong in regards to server-side programming.
Profile Image for Denys.
24 reviews
August 30, 2020
It's a good book to review the basics of Go and different use cases until a little bit of statistics and machine learning.
195 reviews
February 10, 2024
Fine book, but the title is deceiving. It is project focused, and you can learn while building something together. But you won’t be mastering go with it.
Profile Image for Anh Tran.
65 reviews31 followers
August 2, 2023
Appendix A on the Go garbage collector caught my attention, but other than that, there wasn't anything noteworthy.
Displaying 1 - 12 of 12 reviews

Can't find what you're looking for?

Get help and learn more about the design.