гид по экзамену · язык программирования

Go 1.26: вопросы и карточки для практики

Бесплатный курс по языку программирования Go, написанный по спецификации языка и документации стандартной библиотеки: 4 743 вопроса с выбором ответа и 2 314 карточек в 384 наборах — от слайсов и map до планировщика и сборщика мусора. Каждый фрагмент кода скомпилирован и запущен на Go 1.26, а к каждому вопросу есть разбор ответа.

Готовьтесь с wspell

Открыть курс Go попробовать упражнение — без аккаунта Вопросы по Go

  • 30 наборов — без аккаунта
  • все 384 набора — бесплатно с аккаунтом
  • результаты хранятся в этом браузере или в аккаунте

Go — товарный знак Google. Официального экзамена по Go нет: этот курс — собственный учебный материал wspell, и wspell не связан с Google и проектом Go и не одобрен ими.

Начните бесплатный набор — без аккаунта

Для начала — три набора, для которых не нужен аккаунт. Выберите любой — и через пару секунд вы уже отвечаете; результаты остаются в этом браузере.

коротко о главном

Версия Go
Go 1.26 — каждый фрагмент кода скомпилирован и запущен на ней
Содержание
4 743 вопроса и 2 314 карточек в 384 наборах
Разделы
10: Язык · Дженерики · Конкурентность · Ошибки · Стандартная библиотека · Рантайм · Производительность · Тестирование · Инструменты · Идиомы
Формат вопросов
Выбор ответа: четыре варианта, один верный; к каждому — подробный разбор и ссылки на документацию, на которой он основан
Без аккаунта
30 наборов — начните сразу; результаты хранятся в этом браузере
С бесплатным аккаунтом
Все 384 набора; результаты сохраняются в аккаунте
Цена
Бесплатно
Официальный экзамен
Нет — у проекта Go нет сертификационного экзамена; это собственный учебный курс wspell

Попробуйте три вопроса

Примеры вопросов из наборов, доступных без аккаунта, — в том виде, в каком их задаёт курс. Сначала решите сами, потом посмотрите ответ.

  1. Из набора 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
    Показать ответ

    Ответ: A. [99 0 0] 3 3

    Программа печатает [99 0 0] 3 3. Значение slice — это трёхсловный заголовок (указатель на массив-хранилище, длина и ёмкость), и в функцию он передаётся по значению, как и любой другой аргумент в Go. s[0] = 99 пишет через общий указатель, поэтому вызывающая сторона это видит. Затем append обнаруживает, что len == cap == 3, выделяет НОВЫЙ массив и записывает новый заголовок в собственную копию s внутри функции; s[1] = 88 пишет уже в этот новый массив, которого вызывающая сторона не видит. Вариант [99 88 0] 3 3 предполагает, что вторая запись тоже попадёт в исходный массив, но append уже перевёл переменную на другую память. Варианты [99 88 0 4] 4 4 и [99 0 0 4] 4 3 предполагают, что заголовок у вызывающей стороны обновляется вызванной функцией — это невозможно: функция изменила копию заголовка. Именно поэтому результат append всегда присваивают обратно.

    Документация

  2. Из набора 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
    Показать ответ

    Ответ: B. It stops at the send with the all-goroutines-asleep deadlock report

    Проверено на go1.26.4: 10 из 10 запусков одинаковы, код выхода 2, в stdout ничего:

    fatal error: all goroutines are asleep - deadlock!

    goroutine 1 [chan send]:

    Трассировка указывает на строку ch <- "ping".

    Спецификация (Send statements): «A send on an unbuffered channel can proceed if a receiver is ready». Единственная горутина — main, и именно она застряла в отправке, поэтому до приёма на следующей строке выполнение дойти не может. Среда выполнения замечает, что ни одна горутина больше никогда не сможет работать, и останавливает программу.

    Вариант «It prints ping» считает, что в канале есть одно свободное место; у make(chan string) ёмкость нулевая, а «If the capacity is zero or absent, the channel is unbuffered and communication succeeds only when both a sender and receiver are ready» (спецификация, Channel types).

    Вариант «It panics at the send» неверен: блокировка — определённое поведение отправки, а программу завершает проверка взаимоблокировки в среде выполнения, и это фатальная ошибка, а не паника.

    Вариант «It prints an empty line» неверен: выполнение так и не доходит до приёма.

    Документация

  3. Из набора 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>
    Показать ответ

    Ответ: A. true / true false / true <nil>

    Печатается true, true false, true <nil>. Оба сообщения побайтово одинаковы - %w форматирует операнд точно так же, как %v, - поэтому по тексту невозможно понять, какую из ошибок вызывающий сможет разобрать. Разница структурная: %w запоминает операнд, поэтому у возвращённой ошибки есть метод Unwrap, отдающий ErrClosed обратно, и errors.Is его находит. %v просто подставляет текст, создавая обычную ошибку, которая ничего не оборачивает, поэтому errors.Is даёт false, а errors.Unwrap возвращает nil. Это самый значимый выбор одного символа во всей обработке ошибок в Go, и в логах он невидим: случайный %v проявляется как «errors.Is перестала совпадать», а не как ошибка форматирования.

    Документация

Все наборы курса

384 набора в 10 разделах. Без аккаунта сразу запускаются 30 наборов, остальные — с бесплатным аккаунтом.

Язык — без аккаунта: 7 из 63

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

Дженерики — без аккаунта: 2 из 19

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

Конкурентность — без аккаунта: 4 из 42

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

Ошибки — без аккаунта: 3 из 14

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

Стандартная библиотека — без аккаунта: 5 из 122

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

Рантайм — без аккаунта: 2 из 23

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

Производительность — без аккаунта: 1 из 22

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

Тестирование — без аккаунта: 2 из 22

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

Инструменты — без аккаунта: 1 из 32

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

Идиомы — без аккаунта: 3 из 25

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

Что бесплатно

Бесплатны все наборы. Без аккаунта доступны 30 наборов — можно понять, каков курс, ещё до того, как вы кому-то оставите адрес почты; бесплатный аккаунт открывает остальные 354.

Результаты, полученные без аккаунта, хранятся в этом браузере. Создайте аккаунт в этом же браузере — и они сохранятся в нём.

Без аккаунтаС бесплатным аккаунтом
Доступные наборы30 набороввсе 384 набора
Ваши результатыхранятся в этом браузересохраняются в аккаунте — на любом устройстве, где вы вошли
Ценабесплатнобесплатно

Сначала — A Tour of Go

A Tour of Go — интерактивное введение в язык от самого проекта Go: модули коротких уроков, в каждом — код, который можно править и запускать прямо в браузере. Если Go для вас новый, начните с него.

Этот курс — следующий шаг. Тур учит языку, а эти наборы проверяют, можете ли вы предсказать, что делает настоящий код, — что он напечатает, где заблокируется, когда запаникует, — и объяснить почему, опираясь на спецификацию.

Готовьтесь к нему в wspell

Вопросы и карточки по Go 1.26: 30 наборов — без аккаунта, остальные — с бесплатным аккаунтом.

частые вопросы

Курс по Go бесплатный?

Да. Бесплатны все 384 набора: 30 доступны вообще без аккаунта, а бесплатный аккаунт открывает остальные 354.

Что даёт бесплатный аккаунт?

Остальные 354 набора и результаты, сохранённые в аккаунте, а не в одном браузере, — они будут с вами на любом устройстве, где вы вошли. Результаты, полученные здесь без аккаунта, сохранятся в нём, если зарегистрироваться в этом же браузере.

Какую версию Go охватывает курс?

Go 1.26. Каждый фрагмент кода скомпилирован и запущен на выпуске Go 1.26, а разборы цитируют спецификацию и документацию стандартной библиотеки. Go 1.27, вышедший в августе 2026 года, курс пока не охватывает.

Чем это отличается от A Tour of Go?

Тур учит языку, урок за уроком. Этот курс проверяет знание: короткие программы, где нужно предсказать вывод, найти взаимоблокировку или выбрать нужный API, и после каждой — разбор, почему так. Если Go для вас новый, сначала пройдите тур.

Есть ли официальная сертификация по Go?

Нет. Проект Go не проводит сертификационных экзаменов, и этот курс с ним не связан. Это собственный учебный материал wspell, написанный по официальной документации.

Можно ли заниматься с телефона?

Да. Курс работает в браузере на телефоне и на компьютере, а код в вопросах переносится по ширине небольшого экрана.

источники

об этом гиде

Вопросы, ответы и разборы написаны для wspell по спецификации Go и документации стандартной библиотеки, и каждый ответ ссылается на документацию, на которой он основан.

Go меняется с каждым выпуском. Курс проверен на Go 1.26; в любом важном вопросе опирайтесь на спецификацию и примечания к выпускам на go.dev.

факты сверены с источниками выше (28 сентября 2026 г.)