Go interviews focus on goroutines, channels, interfaces, and error handling — the language is small, so questions go deep rather than wide. Below are the most common ones with model answers. Junior: core theory, definitions, and simple practical cases.
Topics to prepare
✓Goroutines and the scheduler
✓Channels and select
✓Interfaces and composition
✓Error handling
✓Slices and maps
✓Context and cancellation
7 Junior-level questions with answers
1
What is a goroutine and how does it differ from an OS thread?
Answer
A goroutine is a function scheduled by the Go runtime rather than the operating system. It starts with a tiny stack of a couple of kilobytes that grows on demand, while an OS thread reserves megabytes, so a program can hold hundreds of thousands of goroutines. The runtime multiplexes them onto a small pool of OS threads and switches at blocking points without a kernel context switch.
2
What is the difference between a buffered and an unbuffered channel?
Answer
An unbuffered channel is synchronous: the sender blocks until a receiver is ready, so it doubles as a synchronisation point. A buffered channel accepts up to its capacity without a waiting receiver and only blocks when full. Use unbuffered when you need a handoff guarantee, buffered to smooth out bursts — but note that a large buffer often hides a design problem rather than solving it.
3
How does select work? What happens if multiple cases are ready?
Answer
select waits on several channel operations and proceeds with whichever is ready. If more than one is ready it picks uniformly at random, which prevents starvation of any single case. A default clause makes the whole statement non-blocking, and a select with no cases at all blocks forever — occasionally used deliberately to park a goroutine.
4
Explain the difference between a slice and an array. How does append work?
Answer
An array has a fixed length that is part of its type and is copied by value. A slice is a header holding a pointer to a backing array, a length, and a capacity, so passing it around copies only the header. append writes into spare capacity when there is room; otherwise it allocates a larger array and copies, which is why the returned slice may no longer share memory with the original — and why you must always assign the result.
5
What is an interface in Go? Why are they called implicit?
Answer
An interface is a set of method signatures; any type that has those methods satisfies it without declaring so. That is what implicit means — there is no implements keyword, so you can define an interface in the consuming package that existing types already satisfy. The idiomatic guidance is to keep interfaces small and define them where they are used, not next to the implementation.
6
How do you handle errors in Go? What is error wrapping with %w?
Answer
Errors are ordinary values returned alongside the result and checked explicitly at each call site. Wrapping with fmt.Errorf and the %w verb preserves the original error inside a new message, so callers can still use errors.Is to test for a sentinel value or errors.As to extract a typed error. Wrapping adds context as the error travels up while keeping it programmatically inspectable.
7
What is context.Context and why is it needed?
Answer
Context carries a cancellation signal, a deadline, and request-scoped values across API boundaries. When a client disconnects or a timeout fires, cancelling the context propagates to every goroutine derived from it, so database queries and HTTP calls abort instead of leaking. Convention is to pass it as the first parameter and never store it in a struct.
🦎
Reading answers is not enough
In a real interview you speak under pressure. Cam asks these same questions, scores every answer, and shows exactly what to fix.