Skip to content

Table of Contents

Go Interview Prep 🎯

A curated, technically-accurate question bank for Go (Golang) engineering interviews — from junior screens to senior/staff loops. Every answer is hidden behind a collapsible <details> block so you can quiz yourself first (active recall) before revealing it.

Part of the Learn Go from Zero repository. 200+ questions and challenges across language internals, concurrency, the standard library, backend & databases, DevOps, system design, coding, and behavioral rounds.


📚 The Files

File What's inside Approx. Qs
go-language.md Core language: types, slices vs arrays, maps, interfaces & the typed-nil trap, pointers, structs & embedding, defer/panic/recover, generics, escape analysis, GC, the memory model. 70+
concurrency.md Goroutines, channel axioms, select, the sync package, context, worker pools & pipelines, races, deadlocks, the GMP scheduler, and goroutine-leak patterns. 40+
stdlib-and-runtime.md encoding/json, reflect, io/bufio, time, and runtime internals (scheduler, GC, preemption). 20+
backend-and-databases.md net/http internals, REST, gRPC, database/sql & connection pooling, transactions, Redis, caching, and SQL indexing. 25+
devops-docker-redis.md Docker multi-stage builds for Go, shrinking images, Redis use cases, and deployment. 15+
system-design.md Go-flavored design prompts — rate limiter, URL shortener, job queue, notification service, and more — with a reusable answering framework. 10+
coding-challenges.md 15 beginner→advanced challenges, each with a hint and a worked, idiomatic Go solution plus complexity notes. 15
behavioral.md 15 behavioral questions with a STAR scaffold and Go-specific talking points. 15
mock-interview-checklist.md A printable mock-loop checklist (phone screen → technical → system design → behavioral) with self-scoring rubrics.

🎚️ Difficulty Legend

Each question is tagged in its summary line:

  • 🟢 Junior — fundamentals every Go dev should know cold.
  • 🟡 Mid — practical depth; idioms, trade-offs, and "why."
  • 🔴 Senior / Staff — internals, edge cases, and the subtle traps that separate "uses Go" from "understands Go."

Don't skip up: a senior who fumbles a 🟢 looks worse than a junior who nails it.


🧠 How to Use This (Active Recall + Spaced Repetition)

This bank is built for retrieval practice, which beats re-reading by a wide margin.

1. Quiz yourself, then reveal. Read the <summary> question, say or write your answer out loud, then expand the <details> to check. The friction of producing the answer is what builds memory.

2. Run a spaced-repetition schedule. Tag each question after you attempt it and revisit on expanding intervals:

Result Next review
❌ Missed it Same day + 1 day
🟡 Shaky 3 days
✅ Solid 7 days → 16 days → 30 days

Move a card up an interval each time you get it right; drop it back to day 1 when you miss it (the Leitner system). Even a checkbox in the margin works.

3. Talk, don't just think. Interviews are spoken. Practice answering in 3–5 sentences out loud — concise, structured, with a concrete example or trade-off. Rambling is the most common failure mode.

4. Code by hand. For coding-challenges.md, write the solution in an editor without autocomplete/AI, then run go vet ./... and go test -race ./.... Re-derive the tricky ones (LRU cache, worker pool) until they're muscle memory.

5. Close the loop with mocks. Once recall is solid, run the full mock-interview-checklist.md loop with a peer and score yourself honestly against the rubrics.


🗺️ Suggested Study Path

  • Week 1 — Fundamentals: go-language.md (all 🟢/🟡), coding-challenges.md (#1–8).
  • Week 2 — Concurrency: concurrency.md end-to-end, coding-challenges.md (concurrency ones), revisit goroutine-leak patterns until automatic.
  • Week 3 — Backend & ops: stdlib-and-runtime.md, backend-and-databases.md, devops-docker-redis.md.
  • Week 4 — Senior signal: all 🔴 questions, system-design.md, behavioral.md, then full mock loops.

✅ Self-Assessment Quick Bar

You're interview-ready when you can, without notes:

  • Explain the slice-append aliasing bug and the typed-nil interface trap.
  • Write a bounded, context-cancellable worker pool from scratch.
  • Name the four channel axioms and the time.After leak.
  • Describe G-M-P, work stealing, and async preemption.
  • Tune database/sql pooling and explain why Rows.Close() matters.
  • Write a Docker multi-stage build that produces a <20MB static Go image.
  • Design a distributed rate limiter and defend the trade-offs.

Contributions welcome — keep answers accurate, idiomatic, and concise. When Go semantics evolve (e.g. loop-var scoping in 1.22, timer GC in 1.23), update the affected answers and note the version.