exam guide · programming language

Go 1.26 practice questions and flashcards

A free course in the Go programming language, written from the language specification and the standard library documentation: 4,743 multiple-choice questions and 2,314 flashcards in 384 sets, from slices and maps to the scheduler and the garbage collector. Every code snippet was compiled and run against Go 1.26, and every question explains its answer.

Prepare with wspell

Open the Go course try a drill now, no account Go practice questions

  • 30 sets need no account
  • all 384 sets free with an account
  • results kept in this browser, or in your account

Go is a trademark of Google. There is no official Go exam: this course is wspell's own practice material, and wspell is not affiliated with or endorsed by Google or the Go project.

Start a free set now — no account

To begin with, three sets that need no account. Pick one and you are answering in seconds; your results stay in this browser.

at a glance

Go version
Go 1.26 — every code snippet was compiled and run against it
Content
4,743 questions and 2,314 flashcards in 384 sets
Areas
10: Language · Generics · Concurrency · Errors · Standard library · Runtime · Performance · Testing · Tooling · Idioms
Question format
Multiple choice: four options, one correct, each with a worked explanation and links to the documentation behind it
Without an account
30 sets — start one now; your results stay in this browser
With a free account
All 384 sets; your results are saved to your account
Price
Free
Official exam
None — the Go project runs no certification exam; this is wspell's own practice course

Try three questions

Sample questions from the sets that need no account, as the course asks them. Settle on an answer, then show the correct one.

  1. From the set Slice headers: len, cap and the backing array

    A batch worker hands a slice to a helper and prints the result afterwards:
    
    func mutate(s []int) {
    	s[0] = 99
    	s = append(s, 4)
    	s[1] = 88
    }
    
    func main() {
    	s := make([]int, 3, 3)
    	mutate(s)
    	fmt.Println(s, len(s), cap(s))
    }
    
    What does main print?
    1. [99 0 0] 3 3
    2. [99 88 0] 3 3
    3. [99 88 0 4] 4 4
    4. [99 0 0 4] 4 3
    Show the answer

    Answer: A. [99 0 0] 3 3

    The program prints [99 0 0] 3 3. A slice value is a three-word header — a pointer into a backing array, a length and a capacity — and it is passed to a function by value, like every other Go argument. s[0] = 99 writes through the shared pointer, so the caller sees it. Then append finds len == cap == 3, allocates a NEW backing array and stores the new header in the callee's own copy of s; s[1] = 88 writes into that new array, which the caller never sees. [99 88 0] 3 3 assumes the second write also lands in the caller's array, but the append moved the callee to different memory. [99 88 0 4] 4 4 and [99 0 0 4] 4 3 assume the caller's header is updated by the callee's append — it cannot be: the callee mutated a copy of the header, which is exactly why append's result must be assigned back by the caller.

    Documentation

  2. From the set Unbuffered channels & synchronous handoff

    A developer passes a value to themself through a channel, all inside one goroutine.
    
    func main() {
    	ch := make(chan string)
    	ch <- "ping"
    	fmt.Println(<-ch)
    }
    
    What happens when this runs on Go 1.26?
    1. It prints ping, because an unbuffered channel still has room for one value
    2. It stops at the send with the all-goroutines-asleep deadlock report
    3. It panics at the send, because the channel has no receiver goroutine
    4. It prints an empty line, because the receive yields the zero value
    Show the answer

    Answer: B. It stops at the send with the all-goroutines-asleep deadlock report

    Verified on go1.26.4, 10/10 runs identical, exit status 2 and nothing on stdout:

    fatal error: all goroutines are asleep - deadlock!

    goroutine 1 [chan send]:

    The trace points at the ch <- "ping" line.

    The spec (Send statements): "A send on an unbuffered channel can proceed if a receiver is ready." The only goroutine is main, and it is the one stuck in the send, so the receive on the next line can never be reached. The runtime notices that no goroutine can ever run again and stops the program.

    "It prints ping" treats the channel as having one free slot; make(chan string) has capacity zero, and "If the capacity is zero or absent, the channel is unbuffered and communication succeeds only when both a sender and receiver are ready" (spec, Channel types).

    "It panics at the send" is wrong: blocking is the defined behaviour of the send, and what ends the program is the runtime's deadlock check, a fatal error rather than a panic.

    "It prints an empty line" is wrong: execution never reaches the receive.

    Documentation

  3. From the set Wrapping with %w, multiple %w & Unwrap

    var ErrClosed = errors.New("connection closed")
    
    func main() {
    	a := fmt.Errorf("send: %w", ErrClosed)
    	b := fmt.Errorf("send: %v", ErrClosed)
    	fmt.Println(a.Error() == b.Error())
    	fmt.Println(errors.Is(a, ErrClosed), errors.Is(b, ErrClosed))
    	fmt.Println(errors.Unwrap(a) == ErrClosed, errors.Unwrap(b))
    }
    
    What is printed (output lines separated by `/`)?
    1. true / true false / true <nil>
    2. false / true false / true <nil>
    3. true / true true / true <nil>
    4. true / true false / false <nil>
    Show the answer

    Answer: A. true / true false / true <nil>

    It prints true, true false, true <nil>. The two messages are byte-for-byte identical - %w formats its operand exactly like %v - so nothing in the text tells you which one a caller can inspect. The difference is structural: %w records the operand, so the returned error has an Unwrap method that hands ErrClosed back, and errors.Is finds it. %v just interpolates the text, producing an ordinary error that wraps nothing, so errors.Is is false and errors.Unwrap returns nil. This is the single most consequential one-character choice in Go error handling, and it is invisible in logs - which is why an accidental %v shows up as 'errors.Is stopped matching' rather than as a formatting bug.

    Documentation

Every set in the course

384 sets in 10 areas. The 30 that need no account start straight away; the rest need a free account.

Language — no account needed: 7 of 63

  • Source representation, lexical elements & semicolon insertion · 15 questions · free account
  • Numeric literals: integer, float, imaginary & digit separators · 14 questions · free account
  • Rune & string literals, escapes and raw strings · 16 questions · free account
  • Constants, untyped constants & default types · 19 questions · free account
  • iota, constant declarations & implicit repetition · 17 questions · free account
  • Constant expressions, representability & compile-time overflow · 15 questions · free account
  • Numeric types: sizes, overflow, shifts & integer division · 19 questions · free account
  • Arrays: value semantics, length in the type & comparability · 16 questions · free account
  • Slice headers: len, cap and the backing array · 18 questions
  • append, growth, aliasing & the three-index slice expression · 20 questions · free account
  • copy, clear & idiomatic slice insert/delete/filter · 16 questions · free account
  • Maps: semantics, comma-ok, delete & unordered iteration · 18 questions
  • Struct types: fields, tags, embedding syntax, comparability · 20 questions · free account
  • Struct layout: padding, alignment & field ordering · 14 questions · free account
  • Pointers, address operators & what is addressable · 16 questions · free account
  • Function types, function literals & closure capture · 19 questions · free account
  • Loop variable semantics: before and after Go 1.22 · 15 questions · free account
  • Interfaces: method sets, satisfaction & the empty interface · 18 questions
  • Value vs pointer receivers, method sets & addressability · 19 questions · free account
  • Type assertions, type switches & the comma-ok form · 16 questions · free account
  • Nil: nil interface vs typed-nil, nil maps/slices/channels/funcs · 16 questions · free account
  • Struct embedding, promotion, depth & shadowing · 18 questions · free account
  • Interface embedding, general interfaces & type sets · 14 questions · free account
  • Named types, aliases, underlying types & type identity · 18 questions · free account
  • Assignability & representability · 16 questions · free account
  • Conversions: numeric, string↔[]byte/[]rune, slice↔array · 18 questions · free account
  • Blocks, scope, shadowing & short variable declarations · 19 questions · free account
  • Operators, precedence & order of evaluation · 19 questions · free account
  • Comparison operators & comparability of every kind of value · 16 questions · free account
  • Composite literals, type elision & addressable composites · 14 questions · free account
  • Selectors, method expressions & method values · 16 questions · free account
  • Statements: if, switch, fallthrough, labeled break/continue/goto · 16 questions · free account
  • for statements & range over every rangeable operand · 18 questions · free account
  • range-over-func iterators, iter.Seq/Seq2 & the yield contract · 18 questions · free account
  • Assignment, tuple assignment, return & named result parameters · 16 questions · free account
  • Terminating statements & the missing-return rule · 12 questions · free account
  • defer: argument evaluation, LIFO order, loops & named results · 20 questions
  • panic, recover & what the runtime panics on · 20 questions · free account
  • Built-ins: len/cap/new/make/append/copy/clear/min/max/delete/close · 18 questions · free account
  • Packages, import declarations, import forms & exportedness · 14 questions · free account
  • Package initialization order, init() & program startup · 16 questions · free account
  • Strings, bytes, runes & UTF-8 correctness · 18 questions · free account
  • unsafe: Pointer rules, Sizeof/Alignof/Offsetof, Slice/String/Add · 18 questions · free account
  • Language versions, //go:build gating & the Go 1.25/1.26 language changes · 14 questions · free account
  • What does this print? — values, copies & aliasing · 18 questions
  • What does this print? — defer, panic & recover chains · 18 questions · free account
  • What does this print? — slices, append & shared backing arrays · 18 questions · free account
  • Find the bug — shadowing, scope & loop variables · 16 questions · free account
  • Does it compile? — assignability, method sets & type errors · 17 questions · free account
  • Spec vocabulary (flashcards) · 22 flashcards · free account
  • Keywords and what each one does (flashcards) · 25 flashcards · free account
  • Operators & punctuation reference (flashcards) · 29 flashcards · free account
  • Predeclared identifiers & built-in functions (flashcards) · 27 flashcards · free account
  • Types at a glance (flashcards) · 20 flashcards
  • Slice & map mental models (flashcards) · 18 flashcards · free account
  • Method sets & interface satisfaction rules (flashcards) · 20 flashcards · free account
  • Zero values & nil behaviours (flashcards) · 18 flashcards
  • defer / panic / recover rules (flashcards) · 16 flashcards · free account
  • Conversion & assignability rules (flashcards) · 20 flashcards · free account
  • Escape sequences, literal forms & UTF-8 facts (flashcards) · 18 flashcards · free account
  • unsafe & layout guarantees (flashcards) · 17 flashcards · free account
  • Compiler & vet messages decoded (flashcards) · 25 flashcards · free account
  • Spec section map (flashcards) · 23 flashcards · free account

Generics — no account needed: 2 of 19

  • Type parameter declarations on functions · 15 questions
  • Generic types, their methods & instantiation · 16 questions · free account
  • Constraint interfaces, type sets & unions · 18 questions · free account
  • Approximation elements (~T) & named-type constraints · 17 questions · free account
  • comparable, strict comparability & interface type arguments · 16 questions · free account
  • cmp.Ordered, the constraints packages & ordering helpers · 14 questions · free account
  • Type inference: function argument inference & constraint inference · 21 questions · free account
  • Inference beyond calls: assignment & conversion contexts · 18 questions · free account
  • Explicit instantiation & partial type arguments · 14 questions · free account
  • Operating on channels, maps & slices in generic code · 14 questions · free account
  • Self-referential and recursive constraints · 12 questions · free account
  • When NOT to use generics · 14 questions · free account
  • Generic data structures & algorithms in practice · 16 questions · free account
  • Generic code and performance: GCShape stenciling & dictionaries · 12 questions · free account
  • Does it compile? — constraint satisfaction & inference failures · 18 questions · free account
  • Terminology (flashcards) · 21 flashcards
  • Constraint library reference (flashcards) · 20 flashcards · free account
  • Type inference rules (flashcards) · 22 flashcards · free account
  • Generic stdlib APIs (flashcards) · 23 flashcards · free account

Concurrency — no account needed: 4 of 42

  • Goroutines: go statements, argument evaluation & lifetime · 18 questions
  • Unbuffered channels & synchronous handoff · 16 questions
  • Buffered channels: capacity, blocking, len & cap · 16 questions · free account
  • Closed channels: receive, send-panic & double-close · 16 questions · free account
  • Nil channels and their role in select · 14 questions · free account
  • Directional channel types & ownership conventions · 12 questions · free account
  • select: pseudo-random choice, default & blocking forever · 18 questions
  • range over a channel & the close contract · 14 questions · free account
  • sync.Mutex: semantics, non-reentrancy & copy hazards · 16 questions · free account
  • sync.RWMutex: when it helps, when it hurts, recursive-read deadlock · 14 questions · free account
  • sync.WaitGroup: Add placement, reuse & WaitGroup.Go (Go 1.25) · 16 questions · free account
  • sync.Once, OnceFunc, OnceValue & OnceValues · 16 questions · free account
  • sync.Cond: Wait/Signal/Broadcast & the loop-on-predicate rule · 14 questions · free account
  • sync.Pool: semantics, GC interaction & correct use · 14 questions · free account
  • sync.Map: when it wins, Load/Store/LoadOrStore/Range/Clear · 15 questions · free account
  • sync/atomic: typed atomics, CAS, Value & Pointer · 18 questions · free account
  • The Go memory model: happens-before & synchronisation edges · 18 questions · free account
  • Memory model corners: atomics, publication & double-checked locking · 16 questions · free account
  • Data races: what counts, what -race finds, benign-race myths · 16 questions · free account
  • context: cancellation, deadlines, propagation & Cause · 18 questions · free account
  • context values, key types & the request-scoped-only rule · 14 questions · free account
  • context misuse: stored in structs, ignored Done, leaked timers · 14 questions · free account
  • Deadlock patterns & "all goroutines are asleep" · 16 questions · free account
  • Goroutine leaks: causes, detection & the leak profile · 16 questions · free account
  • Worker pools & bounded parallelism · 16 questions · free account
  • Pipelines, fan-in/fan-out & explicit cancellation · 16 questions · free account
  • errgroup: WithContext, SetLimit & first-error semantics · 15 questions · free account
  • singleflight, semaphore & the x/sync toolbox · 13 questions · free account
  • Timers, tickers, time.After leaks & Go 1.23 timer changes · 14 questions · free account
  • Graceful shutdown & the lifecycle of a concurrent service · 14 questions · free account
  • Fix the race — diagnose and repair · 18 questions · free account
  • Find the deadlock — diagnose and repair · 16 questions · free account
  • What does this print? — ordering, select & channel timing · 18 questions · free account
  • Concurrency anti-patterns & "share memory by communicating" · 14 questions · free account
  • Primitives reference (flashcards) · 22 flashcards · free account
  • Channel behaviour truth table (flashcards) · 16 flashcards
  • sync & sync/atomic API (flashcards) · 24 flashcards · free account
  • context API & rules (flashcards) · 20 flashcards · free account
  • Memory model vocabulary (flashcards) · 20 flashcards · free account
  • Patterns catalogue (flashcards) · 20 flashcards · free account
  • Leak & deadlock signatures (flashcards) · 19 flashcards · free account
  • golang.org/x/sync toolbox (flashcards) · 12 flashcards · free account

Errors — no account needed: 3 of 14

  • The error interface, error values & construction · 16 questions
  • Sentinel errors: io.EOF, os.ErrNotExist & the sentinel contract · 16 questions · free account
  • Custom error types & when they earn their place · 16 questions · free account
  • Wrapping with %w, multiple %w & Unwrap · 17 questions
  • errors.Is: comparison, custom Is() methods & wrap chains · 16 questions · free account
  • errors.As, errors.AsType (Go 1.26) & target rules · 16 questions · free account
  • errors.Join, multi-errors & tree unwrapping · 14 questions · free account
  • panic vs error: when a panic is actually correct · 16 questions · free account
  • Error message style, context & not logging-then-returning · 14 questions · free account
  • Errors at API boundaries: opacity, stability & documentation · 14 questions · free account
  • Find the bug — error handling mistakes · 16 questions · free account
  • errors package API (flashcards) · 19 flashcards · free account
  • Stdlib sentinel errors you must know (flashcards) · 30 flashcards · free account
  • Error-handling vocabulary & rules (flashcards) · 18 flashcards

Standard library — no account needed: 5 of 122

  • fmt — verbs, flags, width & precision · 20 questions
  • fmt — Stringer, GoStringer, Formatter & recursion traps · 18 questions · free account
  • fmt — Sprintf vs Append*, Fprintf, Sscan family & Errorf · 16 questions · free account
  • strings — search, split, trim, replace & case · 20 questions
  • strings — Builder, Reader, Replacer, Cut & Split iterators · 18 questions · free account
  • bytes — Buffer, Reader & the mirror of strings · 18 questions · free account
  • strconv — Parse*, Format*, Append*, Quote & error shapes · 19 questions · free account
  • unicode & unicode/utf8 — runes, categories & decoding · 17 questions · free account
  • unicode/utf16, text/scanner & text/tabwriter · 15 questions · free account
  • slices — the generic slice toolbox · 24 questions · free account
  • maps & cmp — iteration, cloning & ordering helpers · 19 questions · free account
  • sort — the pre-generics API, sort.Interface & stability · 15 questions · free account
  • iter — Seq, Seq2, Pull, Pull2 & writing iterators · 18 questions · free account
  • io — Reader, Writer, Copy & the composition interfaces · 19 questions · free account
  • io — LimitReader, MultiReader/Writer, TeeReader, Pipe & SectionReader · 17 questions · free account
  • io/fs — FS interfaces, Sub, WalkDir, Glob & ReadLinkFS · 16 questions · free account
  • bufio — Reader, Writer, Scanner & buffer-size pitfalls · 19 questions · free account
  • os — files, permissions, Stat & error predicates · 21 questions · free account
  • os.Root — traversal-safe filesystem access · 14 questions · free account
  • os — environment, args, process, signals & exit semantics · 17 questions · free account
  • os/exec — Command, pipes, context, ExitError & injection safety · 19 questions · free account
  • path & path/filepath — cleaning, joining, globbing & separators · 18 questions · free account
  • embed — embed.FS, directive rules & what can be embedded · 14 questions · free account
  • time — Time, Duration, the monotonic clock & comparison · 18 questions · free account
  • time — layouts, formatting, parsing & locations · 17 questions · free account
  • time — Timer, Ticker, After, AfterFunc & the Go 1.23 changes · 16 questions · free account
  • math, math/bits & math/cmplx · 17 questions · free account
  • math/big — Int, Rat, Float & the receiver-as-destination convention · 16 questions · free account
  • math/rand vs math/rand/v2 — seeding, determinism & migration · 16 questions · free account
  • crypto/rand & secure randomness · 12 questions · free account
  • encoding/json — marshalling, struct tags, omitempty & omitzero · 20 questions
  • encoding/json — decoding into interfaces, numbers, streams & custom marshalers · 18 questions · free account
  • encoding/json/v2 & jsontext — the GOEXPERIMENT in Go 1.26 · 16 questions · free account
  • encoding/xml, encoding/csv & encoding/gob · 20 questions · free account
  • encoding/binary, hex, base32/base64, ascii85 & pem · 19 questions · free account
  • encoding/asn1 & the encoding marker interfaces · 14 questions · free account
  • regexp & regexp/syntax — RE2 semantics, submatches & performance · 20 questions · free account
  • net/http — client, Transport, timeouts & closing bodies · 20 questions · free account
  • net/http — server, Handler, and ServeMux routing (Go 1.22 patterns) · 19 questions
  • net/http — middleware, ResponseWriter, WriteHeader, flushing & hijacking · 17 questions · free account
  • net/http — cookies, redirects, CrossOriginProtection & request hardening · 18 questions · free account
  • net/http — HTTP/2, connection pooling & graceful shutdown · 15 questions · free account
  • net/http/httputil, httptrace, cgi & fcgi · 13 questions · free account
  • net — Dialer, Listener, Conn, deadlines & DNS · 19 questions · free account
  • net/netip, net/url & address parsing · 24 questions · free account
  • net/mail, net/smtp, net/textproto & net/rpc · 16 questions · free account
  • log & log/slog — handlers, attrs, groups, levels & context · 23 questions · free account
  • log/slog — custom handlers, LogValuer, MultiHandler & performance · 16 questions · free account
  • reflect — Type, Value, Kind & the three laws of reflection · 22 questions · free account
  • reflect — settability, struct tags, TypeAssert & iterator methods · 20 questions · free account
  • text/template — actions, pipelines, functions, scoping & errors · 18 questions · free account
  • html/template — contextual escaping and what it will not save you from · 17 questions · free account
  • database/sql — DB, pooling, Query/Exec, Scan & NULL handling · 21 questions · free account
  • database/sql — transactions, context, prepared statements & drivers · 17 questions · free account
  • crypto — hashing: md5/sha1/sha256/sha512/sha3, hash.Hash & HMAC · 19 questions · free account
  • crypto/cipher & crypto/aes — modes, AEAD, nonces & pitfalls · 19 questions · free account
  • crypto/tls — config, versions, certificates & verification · 18 questions · free account
  • crypto/x509 & pkix — parsing, pools, chains & verification · 18 questions · free account
  • crypto public key — rsa, ecdsa, ed25519, ecdh & crypto.Signer · 16 questions · free account
  • crypto — post-quantum & FIPS: mlkem, hpke, fips140, hkdf, pbkdf2 · 14 questions · free account
  • crypto/subtle & handling secrets in Go · 15 questions · free account
  • hash, hash/maphash, crc32/crc64/fnv/adler32 · 17 questions · free account
  • container/heap, container/list & container/ring · 15 questions · free account
  • compress/gzip, flate, zlib, bzip2 & lzw · 15 questions · free account
  • archive/tar & archive/zip · 15 questions · free account
  • mime, mime/multipart & quotedprintable · 15 questions · free account
  • image, image/color, image/draw & the codecs · 16 questions · free account
  • flag — definition, parsing, FlagSet & custom Values · 14 questions · free account
  • expvar, debug/buildinfo & build information · 14 questions · free account
  • go/token, go/ast, go/parser & go/printer · 20 questions · free account
  • go/types — type checking, Info & writing a static analyser · 17 questions · free account
  • go/constant, go/format, go/doc, go/build, go/version · 16 questions · free account
  • unique & weak — interning and weak pointers · 12 questions · free account
  • structs, plugin, syscall & the odd corners · 12 questions · free account
  • index/suffixarray, testing/quick & the rarely-taught packages · 10 questions · free account
  • debug/elf, macho, pe, dwarf, gosym & plan9obj · 12 questions · free account
  • simd/archsimd — the Go 1.26 experiment · 12 questions · free account
  • Deprecated & superseded APIs · 14 questions · free account
  • Pick the right package — API selection scenarios · 18 questions · free account
  • Find the bug — stdlib misuse · 18 questions · free account
  • What does this print? — fmt, time & strconv corners · 19 questions · free account
  • fmt verbs & flags (flashcards) · 30 flashcards · free account
  • strings API (flashcards) · 32 flashcards · free account
  • bytes API (flashcards) · 26 flashcards · free account
  • strconv API (flashcards) · 24 flashcards · free account
  • slices API (flashcards) · 28 flashcards · free account
  • maps, cmp & iter API (flashcards) · 20 flashcards · free account
  • sort API (flashcards) · 16 flashcards · free account
  • io & io/fs interfaces (flashcards) · 26 flashcards · free account
  • bufio API (flashcards) · 20 flashcards · free account
  • os & os.Root API (flashcards) · 30 flashcards · free account
  • os/exec & os/signal API (flashcards) · 18 flashcards · free account
  • path & path/filepath API (flashcards) · 22 flashcards · free account
  • time API & layout reference (flashcards) · 36 flashcards · free account
  • math, math/bits & math/big API (flashcards) · 31 flashcards · free account
  • math/rand/v2 & crypto/rand API (flashcards) · 16 flashcards · free account
  • encoding/json API & struct tag reference (flashcards) · 30 flashcards · free account
  • encoding/* other formats (flashcards) · 28 flashcards · free account
  • regexp API & RE2 syntax (flashcards) · 28 flashcards · free account
  • net/http server API (flashcards) · 29 flashcards · free account
  • net/http client & Transport API (flashcards) · 26 flashcards · free account
  • net, netip & net/url API (flashcards) · 26 flashcards · free account
  • log/slog API (flashcards) · 25 flashcards · free account
  • reflect API (flashcards) · 28 flashcards · free account
  • text/template & html/template reference (flashcards) · 30 flashcards · free account
  • database/sql API (flashcards) · 30 flashcards · free account
  • crypto hashing & HMAC API (flashcards) · 24 flashcards · free account
  • crypto/cipher, aes & AEAD (flashcards) · 20 flashcards · free account
  • crypto/tls & x509 API (flashcards) · 31 flashcards · free account
  • crypto public-key & post-quantum API (flashcards) · 26 flashcards · free account
  • hash & hash/maphash API (flashcards) · 18 flashcards · free account
  • container/* API (flashcards) · 18 flashcards · free account
  • compress & archive API (flashcards) · 23 flashcards · free account
  • mime & multipart API (flashcards) · 19 flashcards · free account
  • image API (flashcards) · 22 flashcards · free account
  • flag & expvar API (flashcards) · 23 flashcards · free account
  • go/* toolchain packages API (flashcards) · 29 flashcards · free account
  • unique, weak, structs & unsafe-adjacent (flashcards) · 15 flashcards · free account
  • debug/* & buildinfo (flashcards) · 18 flashcards · free account
  • Package map — which package holds what (flashcards) · 32 flashcards
  • Stdlib interfaces you must know (flashcards) · 25 flashcards · free account
  • Frozen, deprecated & superseded packages (flashcards) · 22 flashcards · free account

Runtime — no account needed: 2 of 23

  • The GMP scheduler: G, M, P, run queues & work stealing · 18 questions
  • Scheduling points, asynchronous preemption & tight loops · 16 questions · free account
  • Syscalls, handoff, sysmon & blocked threads · 14 questions · free account
  • GOMAXPROCS, container awareness (Go 1.25) & SetDefaultGOMAXPROCS · 15 questions · free account
  • Goroutine stacks: growth, copying, morestack & limits · 14 questions · free account
  • The garbage collector: tricolour marking & write barriers · 20 questions · free account
  • GC pacing: GOGC, GOMEMLIMIT & the GC guide · 20 questions · free account
  • Green Tea GC: Go 1.25 experiment, Go 1.26 default · 13 questions · free account
  • The memory allocator: size classes, mcache/mcentral/mheap, spans · 16 questions · free account
  • Map implementation: Swiss tables (Go 1.24) & what changed · 15 questions · free account
  • Slices, strings & interfaces in memory: headers, iface/eface & itab · 16 questions · free account
  • Finalizers, AddCleanup, weak pointers & object lifetime · 15 questions · free account
  • runtime package API: Gosched, NumGoroutine, Caller, Stack, ReadMemStats · 16 questions · free account
  • runtime/metrics, runtime/debug & the GODEBUG surface · 18 questions · free account
  • cgo at runtime: pointer-passing rules, cost & thread locking · 16 questions · free account
  • Panics, tracebacks & reading a crash dump · 18 questions · free account
  • Scheduler & GC traces: GODEBUG=schedtrace, gctrace, inittrace · 22 questions · free account
  • Scheduler vocabulary (flashcards) · 21 flashcards
  • GC vocabulary (flashcards) · 22 flashcards · free account
  • Memory layout & allocator terms (flashcards) · 20 flashcards · free account
  • GODEBUG & GOEXPERIMENT settings (flashcards) · 30 flashcards · free account
  • runtime & runtime/debug API (flashcards) · 29 flashcards · free account
  • Traceback & crash message decoder (flashcards) · 22 flashcards · free account

Performance — no account needed: 1 of 22

  • Escape analysis: what escapes and why · 18 questions
  • Reading -gcflags=-m and -m=2 output · 14 questions · free account
  • Reducing allocations: preallocation, reuse & zero-alloc paths · 18 questions · free account
  • Slice growth, preallocation & the real cost of append · 16 questions · free account
  • String building: concatenation, Builder, Appendf & conversions · 17 questions · free account
  • Map performance: sizing, key types & when not to use a map · 15 questions · free account
  • Inlining: the budget, what blocks it & how to check · 15 questions · free account
  • sync.Pool & object reuse — correct and incorrect · 15 questions · free account
  • Benchmarking method: b.Loop, ResetTimer, ReportAllocs, benchstat · 18 questions · free account
  • Benchmark pitfalls: dead-code elimination, noise & -count · 14 questions · free account
  • CPU & heap profiling with pprof · 20 questions · free account
  • Block, mutex, goroutine & leak profiles · 18 questions · free account
  • Execution traces, the trace viewer & the flight recorder · 17 questions · free account
  • Profile-guided optimisation (PGO) · 15 questions · free account
  • False sharing, cache lines, alignment & field ordering · 17 questions · free account
  • Concurrency performance: contention, sharding, atomics vs mutex · 18 questions · free account
  • Choosing the fast path — scenario selection · 17 questions · free account
  • Find the slow path — diagnose from a profile · 16 questions · free account
  • Escape analysis & inlining vocabulary (flashcards) · 20 flashcards · free account
  • pprof & trace tooling reference (flashcards) · 26 flashcards · free account
  • Benchmarking flags & testing API (flashcards) · 20 flashcards · free account
  • Cost model — what is cheap, what is not (flashcards) · 24 flashcards · free account

Testing — no account needed: 2 of 22

  • go test: flags, caching, package selection & exit behaviour · 19 questions · free account
  • testing.T basics: Error vs Fatal, Helper, Cleanup, TempDir, Setenv · 19 questions
  • Table-driven tests & subtests with t.Run · 18 questions
  • Parallel tests: t.Parallel, ordering & shared state · 16 questions · free account
  • TestMain, setup/teardown & package-level fixtures · 15 questions · free account
  • Benchmarks: testing.B, b.Loop (Go 1.24), b.N & reporting · 17 questions · free account
  • Fuzzing: f.Fuzz, seed corpus, corpus files & reproducing failures · 17 questions · free account
  • Example functions & Output comments · 13 questions · free account
  • Coverage: -cover, -coverprofile, modes & cross-package coverage · 14 questions · free account
  • testing/synctest — bubbles, virtual time & Wait · 17 questions · free account
  • net/http/httptest — Server, ResponseRecorder & TLS servers · 16 questions · free account
  • Golden files, testdata & update flags · 14 questions · free account
  • testing/fstest, iotest, quick, slogtest & cryptotest · 16 questions · free account
  • Test doubles in Go: interfaces, fakes & why not mocks · 14 questions · free account
  • Flaky tests: time, ordering, network & how to kill them · 14 questions · free account
  • testing.TB, shared helpers & assertions without a framework · 13 questions · free account
  • Integration tests, build tags, short mode & skipping · 16 questions · free account
  • Write the right test — scenario selection · 18 questions · free account
  • testing package API (flashcards) · 30 flashcards · free account
  • go test flag reference (flashcards) · 38 flashcards · free account
  • Test helper packages (flashcards) · 21 flashcards · free account
  • Testing vocabulary & conventions (flashcards) · 20 flashcards · free account

Tooling — no account needed: 1 of 32

  • Modules: go.mod directives and what each one means · 18 questions
  • go.sum, the checksum database, GOPRIVATE & GOFLAGS · 17 questions · free account
  • Semantic import versioning & /v2+ module paths · 16 questions · free account
  • Minimal version selection & the upgrade model · 16 questions · free account
  • go get, go mod tidy / why / graph / edit / vendor / download · 20 questions · free account
  • replace, exclude, retract & the ignore directive (Go 1.25) · 17 questions · free account
  • Workspaces: go work and multi-module development · 14 questions · free account
  • Toolchain lines, GOTOOLCHAIN & language version selection · 14 questions · free account
  • go build: flags, -ldflags, -trimpath, -tags & reproducibility · 21 questions · free account
  • Build constraints: //go:build syntax, file-name suffixes & precedence · 19 questions · free account
  • Cross-compilation: GOOS/GOARCH, GOARM/GOAMD64 & CGO_ENABLED · 17 questions · free account
  • cgo: directives, type mapping, pointer rules & build cost · 18 questions · free account
  • go generate, //go:generate & code generation practice · 16 questions · free account
  • go vet: the analyzer set and what each one catches · 20 questions · free account
  • gofmt, goimports, gofumpt & the formatting contract · 17 questions · free account
  • go doc, doc comments, links, lists & doc.go · 20 questions · free account
  • go fix and the modernizers (Go 1.26) · 16 questions · free account
  • go tool, the tool directive & dependency-pinned tools (Go 1.24) · 15 questions · free account
  • Environment: go env, GOFLAGS, GOCACHE, GOMODCACHE, GOPATH legacy · 17 questions · free account
  • GODEBUG, //go:debug & the Go 1 compatibility promise · 17 questions · free account
  • govulncheck & supply-chain hygiene · 16 questions · free account
  • Delve: breakpoints, goroutines & debugging a live process · 16 questions · free account
  • Compiler & linker directives: //go:noinline, //go:linkname, //go:embed, //go:nosplit · 15 questions · free account
  • Diagnosing a build — read the error, name the fix · 14 questions · free account
  • go command subcommand reference (flashcards) · 32 flashcards · free account
  • go.mod & go.work directive reference (flashcards) · 18 flashcards · free account
  • Environment variable reference (flashcards) · 32 flashcards · free account
  • Build constraint reference (flashcards) · 21 flashcards · free account
  • go vet analyzer reference (flashcards) · 35 flashcards · free account
  • Compiler & linker directive reference (flashcards) · 21 flashcards · free account
  • GODEBUG setting reference (flashcards) · 27 flashcards · free account
  • Module vocabulary (flashcards) · 26 flashcards · free account

Idioms — no account needed: 3 of 25

  • Naming: packages, variables, receivers, interfaces & getters · 20 questions
  • Package design: cohesion, size, cycles & internal/ · 18 questions · free account
  • Accept interfaces, return structs — and when not to · 17 questions · free account
  • Interface design: small, discovered not designed, no premature abstraction · 17 questions · free account
  • Zero-value-useful types & constructor design · 16 questions · free account
  • Composition over inheritance; embedding as a design tool · 16 questions · free account
  • Error-handling style: wrapping, context, and handling exactly once · 16 questions · free account
  • Doc comments: the convention, deprecation notices & examples · 16 questions · free account
  • Concurrency style: never start a goroutine without knowing how it stops · 16 questions · free account
  • API design & compatibility: additive change, options & variadic config · 17 questions · free account
  • Functional options, config structs & the builder trap · 16 questions · free account
  • Code Review Comments — the canonical list, part 1 · 18 questions · free account
  • Code Review Comments — the canonical list, part 2 · 21 questions · free account
  • Effective Go — the parts people skip · 19 questions · free account
  • Go proverbs — what each one actually means · 16 questions
  • Project layout, cmd/, internal/ & the "standard layout" myth · 15 questions · free account
  • Dependency hygiene: stdlib first, x/ packages, minimal dependencies · 14 questions · free account
  • Anti-patterns: util packages, any-soup, getters/setters, global state, init abuse · 16 questions · free account
  • Review this code — pick the idiomatic rewrite · 18 questions · free account
  • Go proverbs (flashcards) · 20 flashcards
  • Code Review Comments index (flashcards) · 31 flashcards · free account
  • Effective Go index (flashcards) · 26 flashcards · free account
  • Naming conventions (flashcards) · 20 flashcards · free account
  • Standard initialisms & Go's house vocabulary (flashcards) · 18 flashcards · free account
  • Design rules of thumb (flashcards) · 20 flashcards · free account

What is free

Every set is free. 30 of them need no account at all, so you can see what the course is like before you give anyone an email address; a free account opens the other 354.

Results you earn without an account stay in this browser. Create an account in the same browser and they are saved to it.

Without an accountWith a free account
Sets you can use30 setsall 384 sets
Your resultskept in this browsersaved to your account, on every device you sign in on
Pricefreefree

Before this: A Tour of Go

A Tour of Go is the Go project's own interactive introduction to the language: modules of short lessons, each with code you can edit and run in the browser. If Go is new to you, start there.

This course comes after it. The tour teaches the language; these sets test whether you can predict what real code does — what it prints, where it blocks, when it panics — and say why, with the specification behind you.

Prepare for it on wspell

Questions and flashcards on Go 1.26 — 30 sets need no account, the rest a free one.

frequently asked questions

Is the Go course free?

Yes. Every one of the 384 sets is free: 30 need no account at all, and a free account opens the other 354.

What does a free account add?

The other 354 sets, and your results saved to your account rather than to one browser, so they follow you to any device you sign in on. Results you earned here without an account are saved to it when you sign up in the same browser.

Which version of Go does it cover?

Go 1.26. Every code snippet was compiled and run against a Go 1.26 release, and the explanations quote the specification and the standard library documentation. Go 1.27, released in August 2026, is not covered yet.

How is it different from A Tour of Go?

The tour teaches you the language, lesson by lesson. This course tests it: short programs where you predict the output, find the deadlock or pick the right API, each followed by an explanation of why. Take the tour first if Go is new to you.

Is there an official Go certification?

No. The Go project does not run a certification exam, and this course is not connected to it. It is wspell's own practice material, written from the official documentation.

Can I use it on a phone?

Yes. It runs in the browser on a phone or a computer, and the code in the questions wraps to fit a small screen.

sources

about this guide

The questions, answers and explanations were written for wspell from the Go specification and the standard library documentation, and each answer links the documentation behind it.

Go changes with every release. This course was checked against Go 1.26; for anything that matters, the specification and the release notes on go.dev are the authority.

facts verified on September 28, 2026 against the sources above