I am the Host. This is Go · medium, lesson 1: Context. Read the teaching and the stills before the checks. The quizzes are open book and test the subject — Go itself — not product rules or layout trivia.
Go Medium · Lesson 1 · On the house
Context
Cancellation and deadlines. Lesson 1 is free — on the house.
Lessons · Go Medium · Lesson 1 of 10 · On the house
Context
Cancellation and deadlines.

You already know Introductory and Easy. Medium assumes those habits and asks for sharper tools.
context.Context carries deadlines, cancellation, and request-scoped values.
WithCancel / WithTimeout derive children. Always cancel to free resources.
Listen on ctx.Done(). Prefer passing ctx as first parameter.
Do not store Context inside structs long-term; pass it.
Put Context in a sentence you could teach a friend: what changes, what stays the same, and what you expect from the still.
Change one dial at a time when you experiment, then re-run. Batch changes invent ghost bugs.
Predict the still on paper before you type. Prediction turns running into confirmation.
Name each token in the still aloud. Hesitation marks the exact gap.
When something fails, read the last error line first. Calm retries beat rewriting everything.
Open-book means the page is a tool. Pick the claim that matches what we traced.
Keep mistaken traces beside corrected ones. The diff is the real lesson.
Label the runtime or toolchain you are using. Boring mismatches still burn evenings.
ctx
package main
import (
"context"
"fmt"
)
func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
fmt.Println(ctx.Err())
}Sit with that still. Trace it top to bottom. Name each piece. The exercise asks you to match its essence.
If something fails when you try it yourself, change one thing. Read the error. Return to the still. I will not rush you.
Quiz
ctx.Done() signals?
Quiz
After WithCancel you should?
Quiz
Context as parameter is usually?
Quiz
context.Background() is?
Quiz
Based on today's teaching, which claim is right?
Quiz
Based on today's teaching, which claim is right?
Quiz
Based on today's teaching, which claim is right?
Check
Match the still for: Context.
That is the lesson. When every quiz and exercise on this page is green, mark it passed. Next lesson when you are ready.
Open-book: the answers are on this page. Pass every quiz and check (8) to mark the lesson done. This visit: 0/8.