liveBook · Manning

Chapter 1: Go is the solution

What you will learn in chapter 1 of Go in Action, Second Edition

The introduction previews the problems Go was designed to solve and the design choices the chapter will explain.

After this chapter you will be able to

Section by section

Introduction

The introduction previews the problems Go was designed to solve and the design choices the chapter will explain.

Key terms: fast compilation, type safety, efficient execution, built-in concurrency, simplicity by design, world-class tooling, language primitive, strong type system, standardized toolchain

1.1 The problems Go was built to solve

This section explains the large-scale development problems that motivated Go, the five goals its designers set, and why pursuing them together distinguishes the language.

Key terms: build times, safe concurrent code, C++, fast compilation, efficient execution, concurrency, ease of programming, robust tooling, all five goals, without significantly compromising

1.2 Fast compilation and type safety

This section explains how Go’s compiler rules support fast builds and how selective type inference preserves static type safety.

Key terms: circular imports, dependency graph, unused imports, compiler, type inference, statically typed language, type safety

1.2.1 Development speed

This section explains how Go’s compilation design supports a fast development loop without giving up static type checking.

Key terms: imports, package, directly imported packages, transitive dependency chain, compiler, development speed, fast edit-run loop, dynamic languages, static type-checking, type safety

1.2.2 Type safety

This section explains how Go’s compiler catches type mismatches before a program runs, avoiding errors that may surface late in dynamically typed programs.

Key terms: type safety, type mismatch, compiler, build error, dynamic language, TypeScript, Python type hints

1.3 Efficient execution

Go’s efficient execution combines concurrent garbage collection, interoperability with existing native code, and simple deployment of compiled binaries.

Key terms: garbage collector, concurrently, sub-millisecond pause times, cgo, C and C++ libraries, incremental migration, statically linked binary, runtime dependencies, shared libraries, container tooling

1.4 Concurrency built in

This section explains why multicore hardware made concurrency important and introduces Go’s built-in, CSP-inspired approach as an alternative to library-based threading.

Key terms: single-core performance, cores, concurrency, concurrency model, threading API, thread pool, shared memory, race conditions, deadlocks, communicating sequential processes

1.4.1 Goroutines

This section introduces goroutines as Go’s simple, lightweight way to run functions concurrently and explains how the runtime schedules them across OS threads.

Key terms: goroutine, go keyword, Go runtime, OS threads, net/http

1.4.2 Channels and context

This section explains how channels let goroutines exchange data safely and how context lets related work stop when it is no longer needed.

Key terms: channels, goroutines, synchronized conduits, atomic, mutex, context package, cancellation signal, deadline, call chain, pipeline

1.4.3 A request’s life cycle

This section follows one HTTP request through a Go service to show how goroutines, channels, context, garbage collection, and a static binary keep the work inexpensive to run and deploy.

Key terms: HTTP request, goroutine, channels, goroutines, operating-system thread, stack, shared memory, locks, context, cancellation

1.5 Simplicity by design

The section explains how Go’s deliberate omissions, composition, interfaces, and generics keep code simple and reusable.

Key terms: small, orthogonal set of features, operator overloading, implicit conversions, class-based inheritance, struct embedding, composition, inheritance, fields and methods, type hierarchy, interface

1.6 World-class tooling

The section explains how Go’s bundled, standardized tools reduce setup and inconsistency while supporting everyday development, reproducible builds, and benchmarking.

Key terms: gofmt, go fmt, standardized tooling, go build, go run, go test, go vet, go doc, go mod, go.sum

1.7 What this book covers

This section previews the book’s path from Go fundamentals to real-world engineering and explains why Go’s stable, deliberate design suits large systems.

Key terms: types, collections, composition model, error handling, multimodule project, generics, simplicity, concurrency model, compiler, toolchain

1.8 Summary

The summary recaps Go’s design for large-scale software engineering: fast compilation with type safety, simple deployment, built-in concurrency, and composition rather than inheritance.

Where this is used later

Concepts explained in this chapter

Chapter 2: Diving into Go →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.