The phrase "a tour of go exercise errors" has no single referent, because A Tour of Go contains dozens of exercises and the errors learners hit are mostly compile errors produced by their own code, not defects in the Tour itself; the answerable question is which exercise mistakes are common, why the Go compiler reports them, and how the exercise's own hints resolve them. The one genuine ambiguity worth naming first: Go's official learning resource published by the Go team is titled A Tour of Go (at go.dev/tour), and it should not be confused with Go by Example or with third-party tutorial sites that reuse the "tour" name and occasionally ship broken snippets. Separately, if the query refers to a specific error message you are seeing rather than to the exercises in general, that message is the missing piece — no error text, Go version, or exercise number is supplied here, so nothing can be diagnosed line by line. What follows covers the errors that recur across the Tour's exercises, the language rules behind them, and the specific confusions that make the Tour's wording easy to misread.

Where the Tour's exercises sit and what kind of errors they produce

A Tour of Go is organized into guided sections — Basics, Flow control, More types, Methods and interfaces, Generics, Concurrency — and most pages end with a small task: write a loop, implement a method, fix a closure, convert a slice to a map, run goroutines through a channel. The playground compiles and runs each edit, so every mistake surfaces immediately as a compiler error or a runtime panic in the output pane. That immediacy is pedagogically useful but also the main source of frustration: Go's compiler stops at the first few errors, error text is terse, and an unused import or unused variable can mask the real problem several lines away.

Two structural facts explain most beginner confusion. First, the Tour's editor pre-imports some packages and not others, so adding a function from a package that is already imported needs no change, while using a package that is not imported requires an import line and using one that is imported but no longer used produces an error. Second, the exercises' starter code often contains deliberately incomplete functions; the compiler error is not a sign the Tour is broken but a sign the exercise is unfinished.

The errors that account for most exercise failures

Unused variables and unused imports

Go's compiler rejects a declared local variable that is never read and an imported package that is never referenced. This trips learners in the loops and functions exercises, where a scratch variable is left over after an edit, and in exercises where a package's function is deleted but its import remains. The fix is mechanical: delete the unused declaration, use _ for a value you must receive but do not need, or remove the import. The blank identifier is the idiomatic answer when a function returns two values and the exercise only needs one, as in map lookups where the second return value reports presence.

Note the asymmetry: unused package-level declarations and unused function parameters are legal in Go, so an error about an unused identifier is always about a local variable or an import.

Type mismatches in numeric conversions

The Tour's numeric exercises expect explicit conversions, because Go does not implicitly convert between numeric types, not even between int and int64 or between float32 and float64. Writing math.Sqrt(x) where x is an int fails; math.Sqrt(float64(x)) compiles. Mixing typed and untyped constants is subtler: var f float64 = 3 is fine because 3 is an untyped constant that takes the declared type, but var f float64 = someInt is not, because someInt already has a type.

Short variable declarations and scope

:= declares and assigns in one step, but it is only legal inside a function and only if at least one variable on the left is new. Two recurring Tour mistakes follow. Reusing := in the same scope where every name already exists gives "no new variables on left side of :=", so the second assignment must be plain =. And in the concurrency and closure exercises, a := inside a loop body or an if block creates a new variable shadowing the outer one; the outer variable then appears never to change. Shadowing is not an error the compiler reports, which is why it is the most persistent silent bug in Tour exercises about closures and goroutines.

Slice bounds, capacity, and the three-index form

The slices exercise is where runtime panics concentrate. Slicing beyond capacity, or with a low bound greater than the high bound, panics at run time rather than failing to compile, so a syntactically perfect program still fails in the output pane. Two distinctions the exercises depend on: a slice's length is how many elements it currently holds and its capacity is how far it can grow before reallocation; and the three-index slice expression s[low:high:max] caps capacity at max-low, which the Tour uses to show how to prevent an append from writing into a shared backing array. A common error is assuming cap(s) always equals len(s) after an append — it frequently does not, because append grows geometrically.

Nil maps and nil slices

Declaring var m map[string]int gives a nil map. Reading from it is legal and returns the zero value; writing to it panics with "assignment to entry in nil map." The maps exercise expects make(map[string]int) before insertion. Slices behave differently: a nil slice is usable with append, and len of a nil slice is 0, so the same "nil" keyword produces two different behaviors depending on type — an asymmetry worth memorizing rather than deriving.

Methods, receivers, and pointer semantics

In the methods section, the error is often "cannot use value as type pointer" or, more confusingly, a program that compiles but does not mutate as expected. A method with a value receiver gets a copy; assigning to a field of that copy does nothing to the caller's value. A method defined on *T is in the method set of *T but not of T, so an interface implemented with pointer receivers cannot be satisfied by a value — this is the standard cause of the interface exercises failing to compile with messages about a missing method, even though the method visibly exists. The Tour's pointer-receiver exercises exist precisely to make that method-set rule concrete.

Interfaces, type assertions, and the empty interface

Two distinct failure modes share nearly identical wording. A type assertion v := i.(T) panics if the dynamic type is not T; the comma-ok form v, ok := i.(T) never panics. But "interface conversion: interface {} is X, not Y" can also mean a method-set problem from the previous section rather than a wrong dynamic type. The exercises around Stringer and error types also catch the mistake of asserting against the interface type instead of the concrete type stored inside it.

Concurrency exercises: channels, deadlock, and the closure capture bug

The concurrency section is where Tour exercises go from compile errors to hangs. A program that sends on an unbuffered channel with no receiver blocks forever, and the Go runtime reports "all goroutines are asleep - deadlock!" rather than a compile error. Closing a channel twice, or sending on a closed channel, panics. Receiving from a closed channel does not panic; it returns the zero value immediately, which is a frequent source of a loop that terminates early or spins.

The single most cited Tour exercise bug is the loop-variable capture in closures. In Go versions before 1.22, the loop variable in a for statement was a single variable reused across iterations, so goroutines or closures created inside the loop all captured the same variable and all observed its final value. The idiomatic fixes were to shadow it (i := i inside the loop) or pass it as a parameter. Since Go 1.22, each iteration has its own variable, so a program written for older Go may behave correctly on a current toolchain while identical-looking code in an older environment still exhibits the classic bug. This is a version-dependent behavior, not a permanent rule, and it is the clearest case in the Tour where the answer depends on which Go release the playground is running.

Generics exercises

The generics section, added to the Tour after generics shipped in Go 1.18, produces its own error family: type parameters that are not constrained enough to support the operations used (invalid operation: cannot use operator == on type parameter), constraint syntax confusion between any, comparable, and union constraints, and inference failures where the compiler cannot deduce the type argument and requires explicit instantiation. These are newer errors than the classic Tour set and are worth treating separately when troubleshooting.

What the error text cannot tell you

Go reports errors in source order and often stops after a handful, so fixing the first error frequently clears several that follow. An unused import error can appear on a line unrelated to the actual mistake, because the import became unused when a later edit removed its only use. And a type error inside a generic function can be caused by the constraint rather than by the call site. Reading the first error and recompiling, rather than trying to fix the whole list at once, is the practical discipline the Tour rewards.

How to work an exercise when the error is unclear

The Tour's own exercise hints are unusually specific and are the first place to look; the slices, maps, and closure exercises each state the exact rule the exercise tests. Beyond that, three habits resolve most cases. Reproduce the error in the smallest possible edit — delete code until the error disappears, and the last deletion is the cause. Check the Go version: the playground tracks recent stable releases, but code copied from older tutorials may rely on pre-1.22 loop semantics or on standard-library functions added in later versions. And distinguish compile-time from run-time failures: "cannot use … as …" and "declared and not used" are compile errors, while index-out-of-range, nil-map assignment, deadlock, and type-assertion panics happen after the program starts, which means the fix is in logic rather than syntax.

The boundary of this answer

Nothing here diagnoses a specific failing exercise, because no error message, exercise title, or Go version was supplied, and the reference date of November 13, 2026 does not establish which toolchain the Tour is running at that moment. A Tour exercise that fails to compile in the browser playground is almost always a code problem rather than a site problem, but if the same code compiles locally and fails in the playground, version skew between the two is the explanation to check first.