← Create New Paste

Go (Golang) Developer Interviews: Concurrency, Interfaces and Practical Questions

4 views
Go interviews tend to focus less on language trivia and more on whether you can write simple, correct, concurrent code. Here is what to prepare and how to talk about it. Concurrency fundamentals Expect to explain goroutines, channels and the select statement. Be clear on the difference between buffered and unbuffered channels: an unbuffered send blocks until a receiver is ready, which makes it a synchronisation point. Know when to use a sync.Mutex instead of a channel; "share memory by communicating" is a guideline, not a rule, and interviewers appreciate that nuance. Common exercises include a worker pool, fan-in/fan-out pipelines and a rate limiter using time.Ticker. Practise writing them from memory, and always mention how goroutines terminate. Leaked goroutines are a classic follow-up question, so show that you use context.Context for cancellation and close channels from the sender side. Interfaces and composition Go interfaces are satisfied implicitly. Be ready to explain why small interfaces such as io.Reader are powerful, and why "accept interfaces, return structs" is common advice. Embedding is often discussed as Go's alternative to inheritance. Error handling Explain idiomatic error handling, wrapping errors with fmt.Errorf and %w, and checking with errors.Is and errors.As. Interviewers may ask when panic and recover are appropriate; the honest answer is rarely, mostly for truly unrecoverable situations or at package boundaries. Memory and performance Know the basics of slices versus arrays, how append can reallocate, and why passing a large struct by pointer may matter. Mention profiling with pprof and benchmarking with testing.B rather than guessing at optimisations. Testing Table-driven tests are idiomatic Go. Show a quick example in an interview if you can, and mention the race detector (go test -race). Talking through design questions For backend roles you may be asked to design a small service: a URL shortener, a job queue or a cache. Explain package layout, how you'd handle configuration, graceful shutdown with signal handling, and observability with structured logging and metrics. Prepare a story or two Have a concrete example of a concurrency bug you found or a performance improvement you made in Go. Real stories are more convincing than definitions. Live coding in Go can be stressful, especially with concurrency. Linkjob AI (https://linkjob.ai) offers real-time help during live job interviews and technical interviews, which some candidates use to keep their reasoning organised. Solid practice with the patterns above remains the core of a good preparation plan.
Created Nov 13, 2026 09:31 Expires Nov 13, 2027 09:31