Practical Systems Programming in Go Book
Practical Systems Programming in Go: A Hands-On Journey into Real-World Systems Code Link to heading
I am thrilled to announce that Practical Systems Programming in Go is now available! This book is written for Go developers ready to move beyond web servers and APIs into the deep, powerful world of systems programming — the domain of command-line tools, network services, file-system utilities, interpreters, and performance-critical infrastructure software.
Who This Book Is For Link to heading
- Intermediate to advanced Go programmers who already know the basics
- Systems engineers, DevOps practitioners, backend developers and infrastructure programmers
- UNIX enthusiasts who want to understand (and rebuild) classic tools in modern, safe, concurrent Go
- Developers interested in language implementation, time-series algorithms or high-performance financial systems
Table of Contents overview Link to heading
Chapter 1: Essential Go
Introduces the Go programming language, covering its core syntax, basic types, control flow, functions, and the tools you need to write, build and run Go programs. In this chapter we present arrays and slices and implement two traditional UNIX command line tools: which(1) and basename(1).
Chapter 2: Data Collections and Functions
Explores maps and structures alongside a deeper treatment of pointers, functions, closures and variadic parameters. By the end of this chapter you will be comfortable organising and manipulating data in idiomatic Go.
Chapter 3: Go Concurrency
Covers goroutines, channels, select, the sync package and the patterns that make concurrent Go programs correct and efficient. We examine how to avoid race conditions and deadlocks, and how to coordinate work across multiple goroutines.
Chapter 4: Advanced Go
Dives into interfaces, reflection, generics and other language features that separate competent Go programmers from expert ones as well as working with dates and times, testing and benchmarking Go code, and creating your own package. This chapter equips you with the tools to write flexible, reusable and robust code while knowing what happens behind the scenes.
Chapter 5: Working with File I/O
Is about reading from and writing to files, working with the io.Reader and io.Writer interfaces, buffered I/O and the standard library packages that make file handling in Go both powerful and ergonomic. In this chapter, we create a wc(1) clone.
Chapter 6: UNIX Signals and File Systems
Covers how Go programs interact with the operating system at a deeper level, including handling UNIX signals gracefully, navigating and manipulating the file system and understanding the implications of these operations in long-running system processes. In Chapter 6, we develop a version of tree(1) and dd(1) in Go.
Chapter 7: Working with Structured Data and Databases
Discusses parsing and producing structured data formats such as JSON and CSV as well as interacting with relational and other databases. We build practical utilities that store, retrieve and process data reliably and a utility that creates reports. The database of choice is SQLite3 but we are also going to create an example using PostgreSQL.
Chapter 8: Programming TCP/IP Services
Explores the net package and the TCP and UDP protocols, developing practical client and server applications that communicate over the network at a low level. You learn how to collect metrics about TCP and UDP connections and make these metrics accessible to Prometheus.
Chapter 9: Creating Web Services
Discusses the net/http package, the development of Web servers and web services, the creation of Web clients and the timing out of HTTP connections while demonstrating how to build production-ready services. We show how to read data from Prometheus.
Chapter 10: Writing a Programming Language
Takes an exciting detour into language design and implementation. We build a small interpreted programming language called SMALL from scratch in Go, covering lexing, parsing and evaluation.
Chapter 11: Adding New Features to SMALL
Continues the work of the previous chapter by extending SMALL with new capabilities, reinforcing how a real language evolves and how its interpreter must grow to accommodate it.
Chapter 12: Time Series Distances
Introduces the concept of time series data and the algorithms used to measure similarity and distance between sequences, implementing a practical Go package along the way. Chapter 12 concludes by showing how to work with TigerBeetle, a high-performance distributed database designed for financial accounting.
Chapter 13: Time Series Data Mining
Builds on the previous chapter to explore data mining techniques applied to time series, including classification, clustering and outlier detection, all implemented in Go.
Chapter 14: Creating an Index for UNIX Files
Brings the book to a close with a substantial systems programming project: building a utility that indexes UNIX files, combining File I/O, data structures and performance considerations into a complete, practical tool.
Get the Book & Explore the Code Link to heading
You can purchase Practical Systems Programming in Go from the following links:
All code from the book is available in the official GitHub repository.
Feel free to star the repo, open issues, submit pull requests or use the code as a foundation for your own systems projects.
Why This Book? Link to heading
While many Go books focus on cloud-native applications and microservices, this one returns to the UNIX philosophy: small, sharp tools that do one thing well — but implemented with modern Go idioms, strong concurrency safety, proper error handling and production-grade concerns like metrics, signals and structured data.
Whether you are writing observability agents, CLI tools, network proxies, file-system utilities, domain-specific languages or financial systems software, the techniques in this book will give you a solid, practical foundation.
Thank you for your support — happy reading and happy coding!