Skip to content

About

Hands-on Go learning roadmap (chapters 01-12 + project ideas), with Java-to-Go comparisons. Every chapter is a runnable program.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Go Learning Roadmap

A hands-on path from zero to building real Go projects. Every folder is a runnable program — read the code, read the comments, run it, then tweak it and break it. That's how Go sticks.

Coming from Java? Watch for the // JAVA: comments throughout — they map each Go concept to what you already know.


0. Setup (do this first)

Go is not installed on this machine yet. Install it:

# macOS (Homebrew)
brew install go

# or download the installer from https://go.dev/dl/

# verify
go version    # should print go1.23 or newer

Then from the repo root:

go run ./01-basics      # run any topic folder like this
go test ./11-testing    # run tests
go vet ./...            # static checks across everything
gofmt -l .              # list files that aren't formatted (should be empty)

Tip: go run ./01-basics runs the whole package in that folder. Each numbered folder is an independent package main with its own func main().


The path

Work through these in order. Each builds on the last. Budget ~30–60 min per folder: read, run, then do the exercises at the bottom of each file.

# Topic What you'll learn Run it
01 Basics variables, types, constants, zero values, :=, printing go run ./01-basics
02 Control flow if, for (the only loop), switch, labels, defer go run ./02-control-flow
03 Functions multiple returns, variadics, closures, defer/panic/recover go run ./03-functions
04 Collections arrays vs slices, maps, strings, runes, range go run ./04-collections
05 Structs & methods structs, methods, pointer vs value receivers, embedding go run ./05-structs-methods
06 Interfaces implicit interfaces, any, type assertions, type switches go run ./06-interfaces
07 Errors error as a value, wrapping, errors.Is/As, custom errors go run ./07-errors
08 Concurrency ⭐ goroutines, channels, select, sync, worker pools, context go run ./08-concurrency
09 Standard library JSON, files, time, HTTP client go run ./09-stdlib
10 HTTP server net/http, routing, handlers, middleware, JSON APIs go run ./10-http-server
11 Testing testing, table-driven tests, benchmarks go test -v ./11-testing
12 Tooling & modules go mod, packages, project layout, dependencies read the README

⭐ = the chapter that matters most. Concurrency is the reason to learn Go and the biggest mental shift coming from Java's thread-per-request world.


Then: build something

Once you've finished 01–12, head to projects/. It has a ladder of projects (each maps to a well-known Java tool) ordered easiest → hardest, with milestones so you always know the next step.

Suggested first build: the worker-pool job queue — it forces you to actually use goroutines and channels, which is where Go's value lives.


How to actually learn this (not just read it)

  1. Run every file, don't just read it.
  2. Do the // EXERCISE: blocks at the bottom of each file. They're small on purpose.
  3. Break things. Change a value, remove a go keyword, swap a pointer receiver for a value receiver — see what the compiler says. Go's compiler is a great teacher.
  4. Keep the Tour of Go and Effective Go open as references.
  5. After each chapter, write a 3-line summary in your own words.

Let's go.

About

Hands-on Go learning roadmap (chapters 01-12 + project ideas), with Java-to-Go comparisons. Every chapter is a runnable program.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages