Summary Go in Practice guides you through 70 real-world techniques in key areas like package management, microservice communication, and more. Following a cookbook-style Problem/Solution/Discussion format, this practical handbook builds on the foundational concepts of the Go language and introduces specific strategies you can use in your day-to-day applications. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology Go may be the perfect systems language. Built with simplicity, concurrency, and modern applications in mind, Go provides the core tool set for rapidly building web, cloud, and systems applications. If you know a language like Java or C#, it's easy to get started with Go; the trick is finding the practical dirt-under-the-fingernails techniques that you need to build production-ready code. About the Book Go in Practice guides you through dozens of real-world techniques in key areas. Following a cookbook-style Problem/Solution/Discussion format, this practical handbook builds on the foundational concepts of the Go language and introduces specific strategies you can use in your day-to-day applications. You'll learn techniques for building web services, using Go in the cloud, testing and debugging, routing, network applications, and much more. After finishing this book, you will be ready to build sophisticated cloud-native Go applications. What's Inside Dozens of specific, practical Golang techniques Using Go for devops and cloudops Writing RESTful web services and microservices Practical web dev techniques About the Reader Written for experienced developers who have already started exploring Go and want to use it effectively in a production setting. About the Authors Matt Farina is a software architect at Deis. Matt Butcher is a Principal Engineer in the Advanced Technology Group at Hewlett Packard Enterprise. They are both authors, speakers, and regular open source contributors. Tabl
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A cookbook-style guide to the practical, production-grade side of Go: 70 techniques for package management, concurrency, web services, testing, and cloud-native deployment. Best for developers who already know Go basics and want the dirt-under-the-fingernails patterns for real applications.
【Book Arc】
- **Opening (~0%–10%)**: Frames the book's philosophy — Go as a simple, concurrency-first systems language — and sets expectations for a Problem/Solution/Discussion format aimed at production readiness rather than language fundamentals.
- **Early (~10%–30%)**: Builds the "solid foundation" layer: goroutines and the scheduler, `go test` tooling, GNU/UNIX-style command-line flags, configuration parsing (INI and similar), and graceful server shutdown.
- **Middle (~30%–50%)**: Moves into concurrency mechanics — yielding to the scheduler, `sync.WaitGroup` for coordinating goroutines, and the pitfalls of assuming goroutines have finished — plus URL routing and handler wiring for web servers.
- **Late (~50%–90%)**: Shifts toward cloud and network concerns: building for the cloud, cross-compiling, runtime monitoring, and communication between services (excerpts only partially cover this stretch).
- **Ending (~90%–100%)**: Culminates in microservices and high availability, including making REST communication faster and connecting distributed services (excerpts are thin here).
【Key Takeaways】
- **Goroutines are the core concurrency primitive** (Early): lightweight functions scheduled across OS threads and cores, making concurrent code feel like ordinary procedural code.
- **Don't assume a goroutine has run** (Middle): `runtime.Gosched` only yields; it does not guarantee completion, so `sync.WaitGroup` is the reliable way to wait for workers.
- **Graceful shutdown prevents data loss** (Middle): the standard `http` server shuts down abruptly, so packages like `manners` (using `WaitGroup` and OS signals) are needed to drain connections cleanly.
- **Use libraries, not forks, for CLI flags** (Early): GNU-style flag parsing is a solved problem — importing packages like `gnuflag` beats maintaining a modified standard `flag` package.
- **Configuration parsing maps files to structs** (Early): third-party packages (e.g., `gcfg`) parse INI/JSON into typed structs, mirroring the standard library's JSON approach.
- **Testing is built in and cheap** (Early): `go test` runs `Test*` functions, reports failures with file and line, and `go test ./...` covers nested packages.
- **Cloud deployment is a first-class concern** (Late): cross-compiling and runtime monitoring are treated as routine production techniques, not afterthoughts.
- **Microservice communication shapes architecture** (Ending): high availability and faster REST communication between services are the book's culminating themes.
【Reading Tips】
- Skim the Opening if you already know Go syntax; the real value starts with the foundation and concurrency chapters.
- Deep-read the concurrency section (goroutines, `WaitGroup`, scheduler yielding) — these are the concepts most likely to cause subtle production bugs.
- Treat the book as a reference: jump to the technique matching your current problem rather than reading linearly.
- Pay attention to the Discussion portions, not just Solutions — they explain trade-offs and when a technique is inappropriate.
- Note the library recommendations (gnuflag, gcfg, manners) as a starting toolkit for production Go.
【Coverage Limits】
The excerpts cover the book's framing, foundational techniques, and concurrency well, but the cloud, monitoring, and microservice chapters are only partially represented — specific techniques there are not fully detailed in this guide.
Excerpt 1
out the Authors Matt Farina is a software architect at Deis. Matt Butcher is a Principal Engineer in the Advanced Technology Group at Hewlett Packard Enterpr...
is works, let’s look at a goroutine that counts from 0 to 4 while the main program prints Hello World concurrently, as shown in the following listing. Listin...
fault value. cli.BoolFlag is an example of a flag without a default value. Its presence sets the value to true, and its absence sets the value to false. The...
an or should pause. Most of the time, the outcome of yield- ing to the scheduler is predictable. But keep in mind that other goroutines may also hit points a...
nd(ch chan<- string, done <-chan bool) { a sending channel. Error handling 89The Concat function takes any number of strings, concatenates them together (sep...
ss variables that are in scope, and can be used to sidestep the fact that GoDoer doesn’t accept any parameters. But if you do this, beware of race conditions...
many opinions. What you can do and how you should structure your HTML templates is left to the application authors. In the next couple of tech- niques, you’l...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Go in Practice (Matt Butcher, Matt Farina)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Go in Practice (Matt Butcher, Matt Farina)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment