1 / 11
Learn Go from zero and build real software with it: types, slices, maps, structs, interfaces, errors, generics, iterators, goroutines, channels, context, testing, net/http, and SQLite. 28 chapters, 4 appendices, 609 pages (PDF), written for Go 1.25.
A Complete, Practical Guide to Simple, Fast, Modern Go
Read before you buy: the PDF here is a free sample — the first 20 pages of the 609-page book (payments, sales and reviews on this demo site are sample data). Get the full e-book at thenexbooks on Gumroad.
Learn Go the way experienced Go developers write it, from your first program to concurrent tools and a tested JSON web API.
Go was designed to make programming simple again. It has a small language you can keep in your head, a fast compiler, a standard library that covers most everyday needs, and a concurrency model that makes "do these ten things at once" readable. Go programs compile to a single binary you can copy anywhere and run.
Simple does not mean there is nothing to learn, though. Slices share memory in ways that surprise newcomers. Interfaces are satisfied implicitly. Errors are values you check and wrap. Goroutines are cheap, but they still leak, race, and deadlock when used carelessly. This book teaches all of it from the ground up, one idea at a time, and always explains why Go works the way it does.
What's inside
- Installing Go, editors, modules, and the go command: run, build, fmt, vet, test
- Variables, constants and iota, types, control flow, functions, defer, and multiple return values
- Strings, runes, bytes, UTF-8, and formatting with fmt
- Arrays, slices (and their hidden backing arrays), and maps
- Structs, methods, pointers, interfaces, type assertions, and type switches
- Idiomatic error handling: wrapping with %w, errors.Is and errors.As, custom error types, panic and recover
- Packages, modules, and a clean project layout
- Generics with type parameters and constraints, plus the slices, maps, strings, strconv, and time packages
- Files and I/O with io.Reader and io.Writer, JSON and CSV, and command-line tools with the flag package
- Concurrency: goroutines, sync.WaitGroup, channels, select, mutexes, atomics, the race detector, context, worker pools, pipelines, and errgroup
- Testing: table tests, subtests, benchmarks, fuzzing, and examples
- Closures, functional options, and range-over-func iterators
- HTTP clients and servers with the enhanced ServeMux, database/sql with SQLite, log/slog, configuration, and debugging with Delve
- Idiomatic style, profiling with pprof, cross-compiling, and shipping small binaries and containers
One running example, start to finish. You write the software for Sprigwell Nursery, a fictional plant nursery with three greenhouses. It grows into sprig, a command-line inventory tool; concurrent workers that watch greenhouse sensors and compare supplier prices; and sprigd, a tested JSON web API backed by SQLite.
Current and honest. The examples target Go 1.25, and most code also runs on Go 1.23 and later. Version-specific features are labeled, and there are no invented benchmarks. Every chapter includes runnable code, Tips, Notes, Warnings, practice exercises with selected solutions, and Key Takeaways.
Format: PDF, 609 pages (A4), linked table of contents and bookmarks. English. First Edition, 2026. Published by thenexbooks. This book is independent and is not affiliated with or endorsed by Google or the Go project.
Table of Contents
Part I — Getting Started
- Ch 1 · Why Go? Simplicity, Speed, and Who Go Is For
- Ch 2 · Installing Go, Modules, Editors, and Your First Program
- Ch 3 · Variables, Constants, Basic Types, and Operators
- Ch 4 · Control Flow and Functions: if, for, switch, defer, and Multiple Return Values
- Ch 5 · Strings, Runes, Bytes, and Formatting with fmt
Part II — Core Language
- Ch 6 · Arrays, Slices, and Maps
- Ch 7 · Structs, Methods, and Pointers
- Ch 8 · Interfaces, Type Assertions, and Type Switches
- Ch 9 · Error Handling: Errors as Values, Wrapping, Custom Errors, panic, and recover
- Ch 10 · Packages, Modules, and Project Layout
Part III — Building Real Programs
- Ch 11 · Generics: Type Parameters and Constraints
- Ch 12 · Standard Library Essentials: strings, strconv, slices, maps, sort, and time
- Ch 13 · Files and I/O: io.Reader, io.Writer, bufio, and the os Package
- Ch 14 · Encoding Data: JSON, CSV, and Struct Tags
- Ch 15 · Building Command-Line Tools with flag, os.Args, and Subcommands
Part IV — Concurrency
- Ch 16 · Goroutines and sync.WaitGroup
- Ch 17 · Channels and select
- Ch 18 · Sharing Memory Safely: Mutexes, sync, atomic, and the Race Detector
- Ch 19 · The context Package: Cancellation, Timeouts, and Deadlines
- Ch 20 · Concurrency Patterns: Worker Pools, Pipelines, Fan-Out/Fan-In, and errgroup
Part V — Practical Go
- Ch 21 · Testing in Go: Table Tests, Subtests, Benchmarks, Fuzzing, and Examples
- Ch 22 · Closures, Function Values, and Iterators (range over func)
- Ch 23 · HTTP with net/http: Clients, Servers, and JSON APIs
- Ch 24 · Working with Databases: database/sql and SQLite
- Ch 25 · Logging with log/slog, Configuration, and Debugging with Delve
Part VI — Projects and Next Steps
- Ch 26 · Project: The Sprigwell Inventory CLI End to End
- Ch 27 · Project: A Small JSON Web API for Sprigwell
- Ch 28 · Idiomatic Go, Performance Basics, Building and Shipping Binaries, and Where to Go Next
Appendices
A · Go Syntax and Standard Library Cheat Sheet
B · The go Command and Tooling Reference
C · Compiler Errors and Common Gotchas Field Guide
D · Glossary
Ready for production services? The companion book Go (Golang) for Backend Developers continues with gRPC, PostgreSQL, Redis, messaging, observability, and Kubernetes.
Book details
| Detail | |
|---|---|
| Pages | 609 |
| Format | PDF (A4) |
| Language | English |
| Level | Beginner to Intermediate |
| Edition | 1st Edition (2026) |
| Download on this site | Free sample, first 20 pages (PDF) |
| Publisher | thenexbooks |
Files you get
No reviews yet. Only buyers can review.
More from thenexbooks