ProgrammingLearning library

Go

Learn simple Go programs, interfaces, and controlled concurrency. Foundational language semantics are separated from evolving module tooling and library guidance; concurrency examples emphasize cancellation and bounded resource use.

Intermediate12 chapters11 practice questions5 references
Start coursePractise questions

Get an in-app notice when new lessons or practice are added.

12 chapters across 4 modules

Course chapters

Explore all 12 chapters in any order. Each chapter has learning goals, a practice prompt, and a primary reference; expanded reading pages are linked from their chapter titles.

01 · Programs and data3 chapters
  1. Packages, modules, and commands

    • Distinguish package import paths, modules, and executable commands

    Practice: Initialize a module, extract a helper package, and run its tests.

    Read the primary referenceLesson guide · Ready
  2. Slices, maps, and zero values

    • Explain shared slice backing storage and useful zero values

    Practice: Write a deduplication function and test aliasing and nil inputs.

    Read the primary referenceLesson guide · Ready
  3. Methods and small interfaces

    • Depend on the behavior a caller needs

    Practice: Implement a reader abstraction with real and in-memory implementations.

    Read the primary referenceLesson guide · Ready
02 · Errors and boundaries3 chapters
  1. Errors and wrapping

    • Preserve a useful cause while adding operation context

    Practice: Return a wrapped file error and classify it without matching strings.

    Read the primary referenceLesson guide · Ready
  2. Resource lifetime and defer

    • Explain when deferred calls execute and what resources they release

    Practice: Read multiple files without retaining every descriptor until the end.

    Read the primary referenceLesson guide · Ready
  3. HTTP handlers and input validation

    • Validate request data before domain work

    Practice: Write a handler with explicit malformed-input and not-found tests.

    Read the primary referenceLesson guide · Ready
03 · Controlled concurrency3 chapters
  1. Goroutines and channels

    Give concurrent work a clear owner, communication path, and stopping rule.

    • Distinguish launching work from coordinating its result and lifetime

    Practice: Build a bounded producer-consumer example and account for every goroutine.

    Read the primary referenceExpanded reading · Ready
  2. Context cancellation and deadlines

    • Propagate cancellation across a request and its dependent work

    Practice: Stop a pipeline early without leaving blocked senders.

    Read the primary referenceLesson guide · Ready
  3. Mutexes and data races

    • Choose synchronization according to ownership and shared mutations

    Practice: Run a concurrent counter under the race detector and fix the race.

    Read the primary referenceLesson guide · Ready
04 · Testing and operating a service3 chapters
  1. Table-driven tests and fuzzing

    • Choose a structured set of examples and an invariant for generated inputs

    Practice: Test a parser with a table and add a fuzz target for round trips.

    Read the primary referenceLesson guide · Ready
  2. Benchmarks and profiling

    • Measure a workload before changing its implementation

    Practice: Compare two data transformations with representative input sizes.

    Read the primary referenceLesson guide · Ready
  3. Build a bounded HTTP collector

    • Integrate deadlines, worker limits, errors, and graceful exit

    Practice: Fetch local test endpoints with a concurrency cap and deterministic shutdown tests.

    Read the primary referenceLesson guide · Ready

Learn it. Check it. Try again.

11 original questions with worked explanations and source references. Filter by difficulty, revisit mistakes, and save your attempt as you go.

Open Go practice

Books & references

Free reading at the publisher or author’s site. External materials keep their own licenses.

  • Go tutorialsGo team · course
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.

  • A Tour of GoGo team · course
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.

  • The Go Programming Language SpecificationGo team · standard
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.

  • Effective Go (foundational guidance)Go team · documentation
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.

  • Go concurrency patterns: pipelines and cancellationGo team · article
    Source & reuse terms

    Free to read at the official provider. This catalog links to the source; it does not reproduce it or assert permission to redistribute it. Product use, hosted labs, and certificates may have separate costs.