Leanpub Header

Skip to main content

Topics

Go

From a first module and gofmt to slices, goroutines, generics and the runtime, production services, Kubernetes operators and the databases, games and graphics people build with it, the Go language as told through the free samples of the Leanpub books about Go.

Created from the free samples of 29 Leanpub books and the descriptions and tables of contents of 12 more, with every source cited.

Go is a statically typed, compiled, garbage-collected programming language developed at Google in 2007 and released as open source in 2009, designed, in one source's summary, to combine the speed and safety of a compiled language with the ease of a dynamic one.[6] Ken Thompson and Rob Pike were among its designers, and the aims were simplicity, fast compilation and suitability for large systems; the name Golang comes from the early community site golang.org, since replaced by go.dev.[16] A Go program compiles to a single native executable, concurrency is in the language as goroutines and channels, cross-compilation is in the toolchain,[16] and the language has twenty-five keywords.[6]

Today Go is the language of much of the infrastructure that other programs run on. It powers Docker, Kubernetes and Terraform,[4] and a 2026 book on distributed systems calls it the natural language for cloud-native services, because a Go service is a static binary that runs in an empty container, starts in milliseconds, and gets HTTP, TLS, connection pooling and structured logging from the standard library.[9] Another 2026 guide treats it as an integrated platform, language, runtime, standard library, build, test and diagnostic toolchain together, and judges it a strong default for command-line tools, agents, network services and control-plane components, and a poor fit for hard real-time control, kernel modules, very small microcontrollers and rich desktop interfaces; the toolchain ships a major release about every six months under a compatibility promise that keeps Go 1 programs building.[7]

This article follows the subject from the language outward: where to begin, the history, the language and its runtime, the view from other languages, services and distributed systems, Kubernetes, tools and testing, and the databases, games, graphics and cryptography that people build in Go. Its sources are the free samples of the Leanpub books listed at the end, with the descriptions and tables of contents of the books whose samples were not available, and every claim that rests on a source is cited to it.

Where to start

Three sources assume no programming at all. Introduction to Programming with Golang is first a book about programming, algorithms and data structures with Go as its reference language, a semester of first-year computer science whose early chapters run in the Go Playground.[14] Go, from the beginning, the most-bought book in the category and free by its author's intent, builds every chapter around an assignment, a solution and a challenge, from a first program to goroutines, a web API and SQLite.[30] My First Go Book is for complete beginners and reaches generics, mutexes and benchmark tests.[31] A Go Developer's Notebook, a hacker's book rather than a professional one by its own description, is written for a curious teenager as much as a graduate, and its author says the free Hello World chapter is enough to learn the language from.[15]

A programmer new to Go has more choice. Learn Go runs from installation to generics, testing and context in a compact 2023 book whose every idea comes with an example and its output.[6] GO Programming in 2026 teaches Go as it stands in 2026, built around Go 1.24 and 1.25, for someone who already thinks in code.[32] Go Faster is ordered the way its author would relearn Go, for readers from object-oriented languages.[28] From Ruby to Golang maps every Go concept to its Ruby counterpart,[4] Go for PHP Developers shows the PHP and Go versions of each thing side by side,[5] and Go A Complete Visual Guide, for systems engineers, gives every example a verification method and asks the reader to trigger its documented failures on purpose.[7]

Once writing Go, the books for the second year are Darker Corners of Go, whose author read an introduction and the specification and still felt unready for real work,[3] Go 101, fifty-three articles on the rules beneath the syntax,[8] and Go Details & Tips 101, which proves each detail with a program and its output.[2] Production Go says plainly that it is not for beginners,[1] Distributed Systems in Go is for the developer who can build one service and must now build a system of them,[9] and Crush The Go Coding Interview holds more than a thousand questions for the interview at the end.[26]

History

Go was developed at Google from 2007 and open-sourced in 2009,[6] by a team the game-programming book names as Ken Thompson, Rob Pike and others, who wanted a language that was simple, fast to compile and suitable for large systems.[16] The author of A Go Developer's Notebook met it in November 2009, when it was still rough at the edges, with makefiles and odd limitations, but already the easiest way to write efficient concurrent programs in a C-like language; she records that opinion was bitterly divided from the release, between those who saw a missing crucial feature and those who saw a nostalgia trip to the 1980s, and that the project was open source but tightly curated, with a specification meant to be read by anyone using it.[15] The Go 1 compatibility promise followed, which keeps Go 1 programs working across later releases within documented limits.[7]

Dependency management changed twice. A 2019 book for PHP developers notes that go.mod and go.sum were available by default only from Go 1.11,[5] and the Ruby book tells the rest: before Go 1.16 packages lived under GOPATH in a fixed layout and the community used a tool called dep, modules became the default in 1.16 and the only workflow by 1.22, and Go 1.18 added workspaces.[4]

Generics took longer. A 2021 mini-book written while the proposal was accepted but not shipped records that the lack of generics was seen by many as an advantage, a deliberate decision that put readability before writing ergonomics, until adoption at scale made reuse a necessity.[34] Custom generics arrived in Go 1.18,[33] and a 2019 book describes its own sample as pre-generics.[15] The releases since show in the newer sources: a 2023 tips book notes range over an integer as a proposal for Go 1.22;[2] the distributed-systems book builds on structured logging from Go 1.21 and pattern routing in the standard HTTP package from 1.22;[9] a 2026 introduction is built around Go 1.24 and 1.25, with iterator functions, generic type aliases and a trace flight recorder;[32] the interview book refers to a Go 1.26 change to the new function;[26] and the visual guide's baseline is Go 1.27.2, which introduced generic methods, a goroutine-leak profile and a second version of the JSON package.[7]

The language

The language books divide into the introductions, which cover the same ground in the same order, and the books of details, which assume the syntax and explain what it does underneath.

Programs, packages and the toolchain

Every Go program starts with a package declaration, an import block and a main function, and the Ruby book says that a reader who can read those three things can read any Go program.[4] A package named main is an executable, every file in a directory belongs to the same package, and the file extension is required, where PHP's is a convention.[5] Visibility is one rule: a capitalised identifier is exported and a lowercase one is private; a module groups packages, and the Ruby book calls go.mod Go's Gemfile and go.sum its lockfile.[4]

The compiler enforces style and hygiene. Gofmt has no options, uses tabs for indentation and spaces for alignment, and, in the darker-corners book's judgement, saves man-years of argument about things that hardly matter; the opening brace must end its line, a side effect of the lexer rather than of gofmt, and a trailing comma is mandatory in a multi-line literal so that lines can be reordered without touching their neighbours.[3] Go 101 gives the two reasons for the line-break rules: faster compilation and code that looks the same whoever wrote it.[8] A program with an unused import or local variable does not compile, a deliberate trade of convenience for build speed and clarity, and an underscore import runs a package only for its side effects, as with the profiling package that exposes HTTP endpoints.[3]

The visual guide walks the toolchain: go run compiles to a temporary executable, go build writes one, go install places a command on the path, go test with the triple-dot pattern tests every package below the directory where the bare command tests only one, and go vet finds suspicious constructs without proving correctness; its layout puts the executable under cmd and reusable logic under internal, where code outside the tree cannot import it.[7] A pure-Go program usually needs no installed runtime, but the guide warns that "Go binaries are static" is not universally true: cgo, system libraries and some build modes add dynamic dependencies, so a release process records the target platform, whether cgo is enabled, build tags and compiler version.[7]

Values, types and the darker corners

Go 101 counts seventeen built-in basic types: one boolean, eleven integers, two floating-point, two complex and one string, with byte and rune as aliases of uint8 and int32.[8] A variable declared without a value gets its type's zero value, 0, false or the empty string, where most languages would give null, and a defined type is distinct from its underlying type while an alias type, added in Go 1.9, is interchangeable with it.[6] The sized integers are close to the hardware on purpose, and the introductory programming book shows what that costs: adding 10 to 250 in an eight-bit unsigned integer wraps to 4, which it sets beside the 1996 Ariane 5 explosion from a 64-bit value forced into 16 bits.[14]

The darker-corners book catalogues what surprises people who already know the syntax. A short declaration inside a nested block creates a new variable, so an error assigned there is lost by the enclosing return; operator precedence has five levels against C's ten, so one shifted left by one plus one is three in Go and four in C; and iota is the index of a constant within its block, not a counter that restarts.[3] A slice is a pointer, a length and a capacity; passing or re-slicing one shares the array, so a function can change its caller's data until an append past capacity allocates a new array and the copies part, and a four-byte slice of a file read into memory keeps the whole file alive.[3] A string is a sequence of bytes that need not be UTF-8, its length is in bytes, indexing gives bytes and the range loop gives runes; the book counts one accented character as seven bytes and four runes, and its benchmark shows a string builder about three thousand times faster than repeated concatenation.[3] Production Go shows the same from the other side: ranging over a string that mixes Latin and Chinese characters yields indexes that jump from 3 to 6.[1] Map iteration order is randomised, though the printing functions and the JSON encoder sort the keys.[2]

Go Details and Tips 101 goes lower. A zero-size field placed last in a struct is padded, because taking its address would otherwise point past the struct's memory block and keep a neighbour alive; ranging over an array iterates a copy unless the element variable is omitted; a set is a map to the empty struct, a trick credited to Tailscale; and a deferred call's arguments are evaluated when it is registered, while a deferred function can change named results after the return statement.[2] The interview book's first chapters drill the same ground: the zero value of a map, iota, the slice header, what append does to aliasing, and how to measure struct padding instead of guessing.[26]

Interfaces, errors and generics

Go is not object-oriented, the Ruby book says: no classes, no inheritance, no exceptions, and in their place structs, composition and error values checked after each call, the if err != nil that stands where a rescue block stood.[4] Errors wrap: the visual guide's first test checks that a wrapped hostname error still matches its cause.[7] Panic and recover remain for the unrecoverable,[6] and the beginner's book runs through custom error types, wrapping, and when panic is appropriate.[31] Interfaces are satisfied implicitly, and the generative-art book shows the pattern in the standard image package: an image is an interface with three methods, a drawable image adds a setter, and the pair resemble the reader and writer interfaces.[17] Functions are values: Learn Go covers closures, variadic functions, named returns and the init function that runs before main.[6]

Generics are the newest part. Generic Go, written against the proposal, explains the need, compares the feature with Java's, covers type erasure, templates and monomorphisation, solves each problem once with the old feature set and once with type parameters, and spends time on when not to use them.[34] Go Generics 101 covers the shipped feature's syntax, constraints, type inference, the operations allowed on values of a type parameter type, and the current restrictions; its author says it is mainly syntax and concepts until he has more experience to draw on.[33] By 2023 the introductions had a generics chapter each,[28] including the first-year programming book.[14]

Concurrency

A goroutine is a lightweight execution context scheduled by the Go runtime, distinct from the thread the kernel schedules; the visual guide's analogy is a restaurant in which goroutines are orders, threads are cooks and cores are workstations, so adding orders creates a queue, not capacity, and it adds that a goroutine is cheaper than a thread but not free, so production systems bound their creation, and that the garbage collector reclaims memory but not file descriptors, connections or goroutines blocked on work that never arrives.[7] Learn Go's last chapter covers goroutines, channels, select, the sync package and context,[6] the beginner's book adds wait groups, mutexes, once and semaphores,[31] and Go 101 gives the subject seven articles, from channel use cases and closing channels gracefully to memory-order guarantees and common concurrent mistakes.[8]

The distributed-systems book turns the primitives into a model: a goroutine is a service, a channel is a network and the context is the kill switch, so timeouts, cancellation, backpressure and graceful shutdown among goroutines are the same patterns as among services; its first example is a page-view counter on an atomic integer, correct on one machine and wrong by design the moment a second server joins.[9] The backpressure manual describes the failure the other way round, a service that accepts everything and moves its backlog into an unbounded channel, a goroutine per request or a retry storm.[23] The lightest treatment is A Language a Day, which demonstrates each of its twenty-one languages' concurrency with Sleep Sort.[29]

Performance and the runtime

Go Optimizations 101 covers using less CPU and memory, making fewer allocations, controlling where they happen and reducing garbage-collector pressure, all for the official compiler and runtime, and opens by saying that most of a codebase should not be optimised at all; it uses neither unsafe pointers nor cgo and does not teach the profiler.[35] The tips book records a compiler limit: a package-level array larger than two gigabytes fails to compile, though a heap-allocated one may be bigger.[2] Production Go advises against the plus operator for string building in a hot path,[1] and the darker-corners benchmark quantifies it.[3] The interview questions name the runtime's levers: the memory limit setting, escape analysis, object pools, the race detector and the profiler.[26] A 2026 introduction ends by profiling its HTTP service under load,[32] and the visual guide warns that concurrency can add contention and memory pressure as easily as speed, so throughput and tail latency are measured rather than assumed.[7]

Coming from another language

Several sources teach Go by translation. From Ruby to Golang began as its author's notes from a 2018 job switch, first published in 2019 and updated for Go 1.22: a class becomes a struct, an exception a returned error, each a for loop, require an import, and a Gemfile the go.mod.[4] Go for PHP Developers, pinned to PHP 7 and Go 1.11, starts from how a program runs: the interpreter reads a PHP file top to bottom and fails on a function used before its declaration, where Go compiles every file first and starts at main; and where PHP has one integer type, Go has eleven.[5] Production Go gives the business case from the same direction, a project that replaced PHP APIs with Go and saw response times fall by an order of magnitude, with retention up and server costs down.[1] Go Faster addresses readers from object-oriented languages,[28] the 2026 introduction names Python, Java, JavaScript and C#,[32] and Generic Go compares type parameters with Java's.[34]

Two books set Go beside its neighbours. A Language a Day gives each of twenty-one languages the same four problems, Hello World, factorial, a polymorphic zoo and Sleep Sort, so the Go chapter can be read against C++, Rust, Kotlin and the rest,[29] and REST HOW TOs implements every task in Python, Ruby, Java, C# and Go in turn.[38] The visual guide's decision table compares Go with Python and shell, Java and .NET, C and C++, and Rust, as an aid rather than a ranking.[7] The author of A Go Developer's Notebook, known for her Ruby talks, chose Go because it is among the smallest general-purpose languages and the smallest in the C family, with first-class functions, concurrency and type inference.[15]

Services and distributed systems

Go's largest territory is the server, and the sources run from the first HTTP handler to a six-service system.

Production services

Production Go's stated goal is a production-ready service, which it defines as the implementation plus reliable deployment, monitoring and iteration; its chapters cover strings and Unicode, concurrency, testing, tooling, security and going into production with continuous delivery, logging, monitoring and alerting.[1] The distributed-systems book lists the practices it treats as baseline: configuration from the environment, structured JSON logs to standard output, health checks for the orchestrator, graceful handling of the termination signal so rolling deployments drop no requests, and metrics and traces; it takes the standard library where the ecosystem has settled, pattern routing in the HTTP package over a framework, and names its departures, pgx for PostgreSQL and a pure-Go Kafka client.[9] The 2026 introduction ends with a concurrent server with structured logging and graceful shutdown, containerised and packaged as a static binary.[32]

The lighter books build the same thing smaller. Go, from the beginning reaches a web API through the standard HTTP package and its multiplexer, after JSON and before logging and SQLite.[30] A textbook from Sapienza University gives Go one chapter of seven in a full-stack course, between designing APIs with OpenAPI and a Vue.js front end.[27] REST HOW TOs builds the client side first, then the server side with GET, POST, PUT, DELETE and OPTIONS.[38] A 2019 book deploys one todo-list API twice on IBM Cloud, on Cloud Foundry and on Cloud Functions, to show the two models side by side.[41] On the wire, Data Serialization in Go takes the standard JSON package as the baseline for every format, grew out of its author's CouchDB client and an unanswered question about embedding a struct with a custom marshaler, and is organised into basics, a toolbox, recipes and other formats; its preface says many sections are still unfinished.[25] The microservices book lists the compatibility rules for protocol buffers: adding or removing a field is safe, renumbering or reusing a field number is not, and renaming breaks JSON clients but not protobuf ones.[10]

Microservices, resilience and distributed systems

Distributed Systems in Go begins with the cost of distribution. It restates the eight fallacies of distributed computing with a Go reading of each, puts a function call at about five nanoseconds against two hundred microseconds for an HTTP call on the same host, and names four measurable reasons to distribute, capacity, fault tolerance, independent deployment and different scaling curves, with "microservices are the standard" explicitly not among them; its fifteen chapters, from a queue between two services through middleware, JWT authentication, Kafka, gRPC with retries and circuit breakers, fan-out and sagas to observability and testing, each end by moving the pattern into a shared platform module.[9] Advent of Go Microservices, from 2020, builds one view-counting service a chapter a day: protobuf messages, a service scaffolded with Twirp first and gRPC second, with the trade-offs listed, HTTP 1.1 and JSON on one side and streaming and wire-compatibility promises on the other, under a local Drone CI pipeline run from a Makefile.[10]

Three short field manuals from 2026 treat one resilience pattern each, with the Go implementation in a companion repository. The rate-limiting manual calls the limiter a load-shedding contract that must fail before the dependency it protects does, and recommends a local token bucket by default and distributed quotas only when business policy needs global accuracy.[22] The backpressure manual traces an incident from a downstream slowdown to retries and useless autoscaling and asks a design review one question: when offered load exceeds capacity, what work is refused, dropped or cancelled, and which metric proves it.[23] The circuit-breaker manual gives the breaker's three states, orders deadline, breaker, attempt and retry, separates retryable failures from caller mistakes, and shows three 150-millisecond attempts with backoff adding up to 600 milliseconds inside a 500-millisecond objective.[24] At the architectural end, a 2026 book builds a portfolio-management system in Go to argue that when AI generates code faster than people can review it, explicit boundaries, domain models, dependency rules and machine-enforceable constraints are what keep a system coherent.[40]

Kubernetes and the cloud

Kubernetes is written in Go, and the category's books on it fall on both sides of the API server. Go Apps on Kubernetes opens with an ordinary rollout that fails: the pod receives the termination signal but reports ready for a few seconds, traffic keeps arriving, in-flight requests drop and the rollout is marked successful anyway; its baseline flips readiness to false on the signal, drains, separates a process-local liveness probe from a readiness probe that checks dependencies with bounded timeouts, and adds a Prometheus endpoint with low-cardinality labels and a pod security context that runs as non-root.[19] The distributed-systems capstone deploys with docker-compose locally and Kubernetes manifests in production.[9]

On the other side are the controllers. The little book of Kubernetes Operators describes the platform as a distributed kernel of controllers each converging on a desired state, and dates custom resources to a third-party-resource feature in version 1.7 renamed in 1.8; its operator, which counts deployments and pods, is written first in Bash, then in Go with the client library and a custom resource definition, then in Python.[20] Build Kubernetes Operators with Kubebuilder follows one operator to a publishable Helm chart: when an operator is the right tool and when a cron job is enough, validation markers and finalizers, idempotent reconciliation, metrics, tests with Ginkgo, Gomega and envtest, and a second API version with a conversion webhook.[37] The platform-engineer interview guide states the invariant behind all of them, that a controller converges current state towards desired state and treats events only as hints, so the reconcile loop must be idempotent; it then explains the controller-runtime manager, the cached client that may read stale data after its own write, and predicates that can filter out a change correctness needs.[21]

Tools, testing and releases

Go's other home is the command line. Mastering Go CLI and TUI starts with the standard flag package, covers pflag, Cobra, Viper and urfave/cli side by side, moves to terminal interfaces with the Charm ecosystem and gocui, and ends with Docker and kubectl plugins and distribution through go install and Goreleaser.[36] The visual guide's running tool reads host information, and its first refactor extracts a seam so that a hostname failure can be tested without touching the operating system.[7]

Testing is built in and plain. Production Go explains that test files sit in the same package with a test suffix, that a test is a function with one argument, that the Go authors chose not to add assertion functions so tests read like ordinary code, and that a table-driven test defines inputs and expected outputs in a slice and loops; it tests an HTTP handler with the recorder from the httptest package, and its case for tests at all is double-entry bookkeeping, a second record that makes an error visible.[1] The beginner's book adds benchmark and example functions,[31] the free introduction covers coverage,[30] and the distributed-systems book tests against real databases in containers, runs the race detector, kills a dependency mid-test and checks for leaked goroutines.[9] The visual guide's repeatable loop is format, test, vet, build, then run the artifact from another directory and read its embedded build metadata.[7]

Builds and releases run through the same toolchain. The microservices book keeps a format step in its CI pipeline and builds Docker images from a Go base image,[10] the interview questions cover build tags, vendoring, cross-compiling for ARM64 and WebAssembly, and building with cgo disabled,[26] the game book embeds its assets with the embed directive and ships for desktop and the browser through WebAssembly,[16] and the generative-art book ends the same way, turning its sketch into a web application in WebAssembly.[17]

Go as the vehicle

A fifth of the category's books teach something other than Go and use Go to do it. Their authors say so: the generative-art guide will not teach the language and points newcomers to the Tour and to Play with Go,[17] the game book assumes Go and teaches game development,[16] and the database book's description calls its code language-agnostic.[13]

Databases

Build Your Own Database in Go From Scratch codes a database in about three thousand lines, with the line count at each step, from a copy-on-write B+tree and an append-only key-value store through tables, range queries, secondary indexes, transactions and concurrency control to a SQL-like parser and interpreter.[13] Its introduction sets the principles first: durability is the fsync call and atomicity is all or nothing; a plain file overwrite fails both, an atomic rename survives a concurrent reader but not a power loss until the directory is synced too, and an append-only log needs a checksum per entry to detect a torn write; only the B+tree and the LSM-tree suit disk, where latency is three orders of magnitude above memory.[13] Code a database in 45 steps covers the same ground as test-driven puzzles, most under fifty lines, with no dependencies.[39]

Bitemporality in Go builds a different kind of database on top of SQLite. Its first chapter shows an employee transferred between departments by an update that loses the history, walks three cumbersome workarounds, and then gives each record four fields, when the database recorded and invalidated it and when it became and stopped being true in the world, so that a transfer effective on one date but recorded on another answers two different questions.[12] The author chose Go over Rust and C++ for its clarity in teaching, pins Go 1.24.0 and SQLite 3.49.0, and builds with Bazel and Protocol Buffers.[12] The distributed-systems book covers the client side, pgx, the repository pattern, type-safe SQL without an ORM and zero-downtime migrations.[9]

Graphics, games and generative art

Go With Graphics works up from the standard image package: the decoders for JPEG, PNG and GIF are registered by underscore imports, and the colour at a pixel comes back as sixteen-bit alpha-premultiplied values, so a half-transparent white pixel reads as 127 in every channel until the image is drawn into a non-premultiplied type through the draw package; the resize chapter derives nearest-neighbour interpolation, which turns a five-pixel strip into jagged loss, and then bilinear interpolation from four weighted neighbours, and the later chapters cover edge detection, focal points, filters and watermarking.[11] Generative Art in Go defines its subject with Philip Galanter's 2003 paper, a system set in motion with some autonomy, and a dice-and-two-paints example in which the dice is the uncertainty every generative work needs; it then implements one sketch, called Squares, from the standard image and colour packages.[17]

Beginning Game Programming with Go builds a Vampire Survivors-style game, Gopher Survivor, in fourteen cumulative chapters on Ebitengine, an open-source 2D library by Hajime Hoshi that provides a window, a game loop, rendering, input and audio but no editor, physics engine or scripting layer; its case for Go in games is short compile times, one binary with no runtime to bundle, trivial cross-compilation and goroutines for asset loading, with the concession that 3D blockbusters belong to C++ and specialised engines.[16] A Go Developer's Notebook takes the exploratory route through virtual machines, Mandelbrot sets and caches,[15] and the first-year programming book closes with Eight Queens, Conway's Game of Life, the Tower of Hanoi and Blackjack.[14]

Cryptography and networking

GoLang Cryptography for Developer, from 2018, is a cookbook with one runnable program per primitive; its sample covers Argon2, the 2015 Password Hashing Competition winner, with the hybrid key function as the default when unsure, DSA signing and verification with the standard library's four parameter sizes, and a Curve25519 key agreement.[18] One of its examples hashes the message with MD5 before signing, and its chapter list runs to RC4, Blowfish and triple DES beside AES and ChaCha20-Poly1305, so a reader takes the API shapes and checks the algorithm choices against the date.[18] A Go Developer's Notebook puts HTTP, TCP/IP, UDP and RSA into its free Hello World chapter, which its author offers as a free resource on networking and cryptography in Go.[15] For services, the distributed-systems book generates and validates JWTs with ECDSA and publishes keys through a JWKS endpoint,[9] and the visual guide's later parts, by its contents, cover deadline-aware TCP protocols, production HTTP clients and security.[7]

Sources

Every source is a Leanpub book. The note after each says which part of it was read; where no sample was available, only the public description and table of contents were used.

  1. 1.
    Production Go, Herman Schaaf, Shawn Smith: Build modern, production-ready web services in Go Free sample: the introduction on why Go in production, the strings chapter with the strings package and a palindrome program, and the testing chapter through table-driven tests and HTTP handlers. 2022. Free sample: PDF · EPUB
  2. 2.
    Go Details & Tips 101, Tapir Free sample: the about pages and the syntax and semantics section, from zero-size types and for-range copies through addressability, map tricks, compile-time assertions and deferred calls. 2025. Free sample: PDF · EPUB
  3. 3.
    Darker Corners of Go, Rytis Bieliunas Free sample: the introduction and chapters 1 to 8, on formatting, imports, variables and shadowing, operators, iota, slices and arrays, strings and UTF-8, and the start of maps. 2021. Free sample: PDF
  4. 4.
    From Ruby to Golang, Joel Bryan Juliano: A Ruby Programmer's Guide to Learning Go Free sample: the preface and introduction, chapter 1 on packages, printing and functions, and the package-management chapter on modules, go.sum, workspaces and dep. 2026. Free sample: PDF · EPUB
  5. 5.
    Go for PHP Developers, Stephen Afam-Osemene: Learning Go using PHP Free sample: getting started, running a program, unused variables, variables and the primitive types, each beside its PHP equivalent. 2019. Free sample: PDF · EPUB
  6. 6.
    Learn Go, Karan Pratap Singh: Master the fundamentals and advanced features of the Go programming language Free sample: the preface, installation, Hello World, variables and data types, string formatting, flow control and functions; the sample stops in chapter I. 2023. Free sample: PDF
  7. 7.
    Go A Complete Visual Guide, Reiner Braun: A Visual Practical Guide — Foundations Through Production Systems Free sample: the introduction, the big picture, chapter 1 on the systems-engineering model and chapter 2 on the toolchain and a repeatable build. 2026. Free sample: PDF · EPUB
  8. 8.
    Go 101, Tapir Free sample: the contents of all fifty-three articles, the acknowledgements, the source-code-elements article and the start of basic types. 2025. Free sample: PDF · EPUB
  9. 9.
    Distributed Systems in Go, Joel Bryan Juliano: A Complete Guide to Building Cloud-Native Distributed Go Systems Free sample: the preface, the introduction with the mental model and the platform SDK, and chapter 1 on the cost of coordination. 2026. Free sample: PDF · EPUB
  10. 10.
    Advent of Go Microservices, Tit Petric Free sample: the introduction and requirements, the protobuf messages chapter with the Drone CI build image, and the services chapter on Twirp against gRPC. 2020. Free sample: PDF · EPUB
  11. 11.
    Go With Graphics, Tit Petric Free sample: the introduction and requirements, the standard image packages chapter on loading, colours, NRGBA conversion and saving, and the resize and crop chapter's interpolation section. 2021. Free sample: PDF · EPUB
  12. 12.
    Bitemporality in Go, Burke Carter Free sample: the foreword, chapter 1 on why bitemporal data with the HR example and the bitemporal plane, and the dependencies page. 2025. Free sample: PDF
  13. 13.
    Build Your Own Database in Go From Scratch, build-your-own.org: From B+tree to SQL in 3000 lines Free sample: the introduction on durability, indexing and the KV interface, chapter 1 on files, atomic renaming and append-only logs, and the start of chapter 2. 2026. Free sample: EPUB
  14. 14.
    Introduction to Programming with Golang, Youri Ackx: Learn programming, data structures and algorithms using the Go programming language Free sample: the introduction, abstraction and a first program, bits and bytes, overflow with the Ariane 5 story, and the opening of the programming-blocks chapter. 2024. Free sample: PDF · EPUB
  15. 15.
    A Go Developer's Notebook, Eleanor McHugh: Where I Go During My Holidays Free sample: the preface on the author's history with computers and why Go, and the opening of Introducing Go; the sample shows no code. 2019. Free sample: PDF · EPUB
  16. 16.
    Beginning Game Programming with Go, Luigi Vanacore: A hands-on, project-based guide to 2D game development in Go Free sample: the introduction on Go, Ebitengine and the game to be built, with the comparison table against Vampire Survivors, and chapter 1 through installing Go. 2026. Free sample: PDF · EPUB
  17. 17.
    Generative Art in Go, Preslav Rachev: A creative guide Free sample: chapter 1, the definition and dice example of chapter 2, the image interfaces section and the sketch parameters; most other sections are withheld. 2026. Free sample: PDF · EPUB
  18. 18.
    GoLang Cryptography for Developer, Anish Nath Free sample: the Argon2, DSA and Curve25519 chapters, each with a runnable program and its output. 2018. Free sample: PDF · EPUB
  19. 19.
    Go Apps on Kubernetes, Luca Sepe: Production Best Practices Free sample: selected panels on the rollout failure, probe semantics with Go handlers, the Prometheus endpoint, OpenTelemetry and the pod security baseline. 2026. Free sample: PDF
  20. 20.
    The little book of Kubernetes Operators, Oz Tiram: Learn how to write a Kubernetes Operator from scratch using Go Language and Python. Free sample: the introduction, the first operator in Bash, the Go project layout and Makefile, and the debugging chapter with a service-account kubeconfig and devspace. 2025. Free sample: PDF
  21. 21.
    The Kubernetes Platform Engineer Interview Guide, Luca Sepe: Advanced Controllers, Syncers, Multi-Tenancy, API Scalability, and Staff-Level System Design Free sample: selected panels on how to use the book, controller-runtime internals with commented snippets, and the start of the syncer architecture. 2026. Free sample: PDF
  22. 22.
    API Rate Limiting & Throttling, Luca Sepe: Distributed Quotas, Kubernetes Protection, Tenant Fairness, and Go Middleware Free sample: selected panels on reader paths, the operating principle, fairness keys, algorithms, local against distributed state and cluster trade-offs. 2026. Free sample: PDF
  23. 23.
    Backpressure in Microservices, Luca Sepe: Bounded Queues, Worker Pools, Cancellation, Drop Policies, and Overload Control in Go Free sample: selected panels on how to use the book, the business case, the incident chain, decision points and the cost model. 2026. Free sample: PDF
  24. 24.
    Circuit Breaker and Retries with Exponential Backoff, Luca Sepe: Resilient Microservice Calls, Failure Containment, Kubernetes Operations, and FinOps Impact Free sample: selected panels on the series, the breaker as a state machine, failure classification, latency and consistency impact and the defaults table. 2026. Free sample: PDF
  25. 25.
    Data Serialization in Go, Jonathan Hall: The Complete Guide to JSON and Other Serialization Formats in Go Free sample: the preface, intended audience, the JSON baseline, how the book is organised, the work-in-progress note and the table of contents. 2020. Free sample: PDF
  26. 26.
    Crush The Go Coding Interview, MZ Ahmad: 1000+ Expert-Curated Questions to Master Real-World Golang Programming Free sample: the question titles of chapters 1 and 2, on the core language, modules, toolchain, data structures and memory, and the start of chapter 3; no answers are shown. 2026. Free sample: EPUB
  27. 27.
    Introduction to full stack web development with Go and Vue.js, Emanuele Panizzi, Enrico Bassetti Free sample: the contents, the preface on audience and conventions, and the start of chapter 1; the Go chapter itself is not in the sample. 2024. Free sample: PDF
  28. 28.
    Go Faster, Ollie Phillips: Join the thriving community of skilled Go developers! Free sample: the Before you begin page on the Playground, installing Go 1.19 and editors; every other chapter is withheld, so the rest is from the table of contents. 2023. Free sample: PDF · EPUB
  29. 29.
    A Language a Day, Andrew Shitov: A brief introduction to 21 programming languages: C++, Clojure, Crystal, D, Dart, Elixir, Factor, Go, Hack, Hy, Io, Julia, Kotlin, Lua, Mercury, Nim, OCaml, Raku, Rust, Scala, and TypeScript Free sample: the front matter and preface on the four problems every chapter solves, and the C++ and Factor chapters; the Go chapter is not in the sample. 2024. Free sample: PDF
  30. 30.
    Go, from the beginning, Chris Noring: from o to hero No sample: from the description and table of contents. 2022.
  31. 31.
    My First Go Book, Mohd Ejaz Siddiqui: stepping into the world of Golang No sample: from the description and table of contents. 2026.
  32. 32.
    GO Programming in 2026, SouthStone Publications No sample: from the description; the listing has no table of contents. 2026.
  33. 33.
    Go Generics 101, Tapir No sample: from the description and table of contents. 2025.
  34. 34.
    Generic Go, Preslav Rachev: Get the most out of type parameters and avoid the nasty pitfalls No sample: from the description and table of contents. 2021.
  35. 35.
    Go Optimizations 101, Tapir No sample: from the description; the listing has no table of contents. 2025.
  36. 36.
    Mastering Go CLI and TUI, Ravikanth Chaganti: Create powerful, user-friendly command-line (CLI) and terminal user interface (TUI) applications in Go! No sample: from the description and table of contents. 2024.
  37. 37.
    Build Kubernetes Operators with Kubebuilder, Kirshi Yin | Curious Devs Corner: A Complete Guide to Creating, Testing, and Publishing Custom Controllers No sample: from the description and table of contents. 2026.
  38. 38.
    REST HOW TOs, A.P. Rajshekhar, Shrikant Khare: Consuming and Building REST API in Python, Ruby, Java, C# and Go No sample: from the description and table of contents. 2022.
  39. 39.
    Code a database in 45 steps (Go), Lowram Eepson: a series of test-driven small coding puzzles No sample: from the description; the listing has no table of contents. 2025.
  40. 40.
    Architecture at Machine Speed, Nathan B. Crocker: Building Go Systems That Humans and AI Can Safely Change No sample: from the description; the listing has no table of contents. 2026.
  41. 41.
    Getting Started with Go on IBM Cloud, Matthew Rankin No sample: from the description and table of contents. 2019.

Further reading

Other books in the library on the same ground, not cited above.

  • x days of Go, Matt Boyle A collection of Go tips the author first posted on X. 2023.
  • Golang Guia Simples e Rápido, Paulo Lopes Estevão: Decolando com Golang Guia Simples Rápido e Interativo A short Portuguese-language starter on Go's fundamentals and syntax. 2022.
  • Introduction to Google's Go Programming, Orhan Gazi: GoLang An introduction to the Go language, described by its listing as fast, statically typed and built for networking and server-side programs. 2024.

This is an article created from the free samples of 29 Leanpub books and the descriptions and tables of contents of 12 more. We're building these articles to provide you, the Leanpub reader, with a good jumping-off point to discover more Leanpub books that are interesting and relevant to you. We never use material which is paid-only when building these articles: we only use material which is already free on Leanpub. However, Leanpub authors can opt out from inclusion in articles from their book settings page.

Updated November 2026.

In the Leanpub store: 90 books · 2 courses in the Go category

All topics