Know Go

Know Go

$29.95

Interfaces, generics, and iterators are key to modern Go. Learn all about them with this easy-to-read but comprehensive guide.

Add To Cart

Who is this book for?

Software engineers who want to understand Go in depth, especially its modern type system, and learn to use the newest language features, including generics and iterators, with confidence. Written for experienced programmers, including clear explanations without unnecessary theory.

What problem does it solve?

Most books on Go either predate generics or only have space for a brief introduction. As a result, many Go programmers know the syntax, but not the ideas behind it.

Know Go is devoted to Go’s biggest language changes in years: generics (introduced in Go 1.18) and iterators (Go 1.23). As these features evolve, the book is updated for each Go release, so it stays current rather than gradually becoming a historical snapshot. It includes dozens of examples you can adapt and use in your own programs.

Rather than simply documenting the language features, Know Go explains the design decisions behind them, helping you understand why Go works the way it does.

What will I learn?

Most Go programmers have encountered generics, but many still aren’t sure when to use them or how to design good generic APIs. Know Go explains not just the syntax, but the reasoning behind it, so you can use generics naturally rather than mechanically.

  • Generic programming: write functions and types that work with many data types without sacrificing type safety.
  • Type parameters: understand how generics differ from interfaces, and when to use each.
  • Constraints and type sets: master Go’s type system, including approximations and custom constraints.
  • Collections: build reusable container types that feel like native maps and slices.
  • The standard library: use Go’s growing collection of generic APIs and packages effectively.
  • Iterators: create, consume, and compose iterators using the new iter package and iterator-based APIs.

What do I get?

  • PDF and ePub included
  • Works on computers, tablets, phones, and ebook readers
  • Free lifetime updates

Pavel Anni, Senior Training Architect, MinIO

“Everything I wanted to know, beautifully explained!”

I haven’t used generics before in other languages, but I’ve heard a lot about generics in Go, so I was eager to learn more and to find out how I can use them. Overall, it's going to be a very useful book! I like that it addresses a pretty wide audience.

Domas Tamašauskas, Software Engineer, Cast AI

“It feels like I've unlocked some forbidden magic!”

This is my favourite of John’s books so far.

Dan Macklin, CPTO, Skyral

“It's taken me from apprehensive to excited.”

I’ve just finished reading the book, and it’s taken me from being apprehensive about learning something new to being excited about the possibilities that generics brings to simplify the codebases that I work with.

Contents

Sample chapter

Explore Go: Cryptography

Explore Go: Cryptography

$29.95
The Complete Go Library
sale

The Complete Go Library

Sale Price:$119.80 Original Price:$149.75
The Power of Go: Tests

The Power of Go: Tests

$29.95
The Power of Go: Tools

The Power of Go: Tools

$29.95
The Deeper Love of Go

The Deeper Love of Go

$29.95