Back to Blog

Senior Go Interview Prep: What Actually Gets Tested in 2026

Senior Go interviews skip syntax and test concurrency judgment, error handling, and design. This guide covers what gets asked and how to answer it.

Senior Go Interview Prep: What Actually Gets Tested in 2026

A senior Go interview isn't a syntax quiz. Nobody hiring a senior engineer cares whether you can recite the three-clause for loop or remember that append might reallocate.

They want to know whether you can track down a goroutine leak, defend the way you handle errors, and design an API the team can live with for two years. The questions are open-ended on purpose. The interviewer is watching how you think, not checking whether you memorized the standard library.

This guide covers the topics that separate senior candidates from mid-level ones, with runnable code for each. It's based on what working Go developers say they build and struggle with, not on scraped "top 50 questions" lists.

TL;DR

  • Concurrency is where prep pays off most. The two things Go developers build most are API/RPC services (75%) and command-line tools (62%), and both lean hard on goroutines, channels, and context (Go Developer Survey 2024 H2).
  • The top reported challenge is writing idiomatic code, not missing features. 33% of respondents named "ensuring our Go code follows best practices and idioms" as their biggest challenge, more than named any missing language feature (2025 Go Developer Survey).
  • Data races happen in production, so expect them in interviews. Uber's race detector found roughly 2,000 data races in their Go monorepo, and 210 engineers fixed about 1,100 of them over six months (Uber Engineering).
  • Know errors.Is, errors.As, and %w cold. 28% of respondents said Go lacks a feature they valued in another language, and error handling tops that list, so interviewers probe how you handle it (2025 Go Developer Survey).
  • Generics are fair game, but they're also a trap. They shipped in Go 1.18, which the Go team called "the biggest change ever to the language" (Go Blog). The senior signal is knowing when not to use them.
  • Target the current toolchain. Go 1.26 is the latest stable release (Go 1.26 release notes). Interviewers notice when you describe an old version's behavior.

Table of Contents

What a Senior Go Interview Actually Tests

No authoritative survey ranks "the most common Go interview questions," and you should distrust any blog that quotes a precise percentage.

What you can do is work backwards from what Go developers spend their time on. The 2024 survey found that 75% of respondents build API or RPC services and 62% build command-line tools (Go Developer Survey 2024 H2). That work is concurrent, network-bound, and full of ways to fail, which is why interviews keep coming back to concurrency, context, and error handling.

The 2025 survey asked people about their biggest challenges:

  • 33% named following best practices and idioms.
  • 28% named a feature they valued in another language that Go doesn't have, most often error handling, sum types, and nil-pointer safety.
  • 26% named finding trustworthy modules (2025 Go Developer Survey).

A lot of a senior interview is the company checking whether you've absorbed the idioms that a third of the community finds hard.

So the interview is mostly a test of judgment. Do you pick the right concurrency primitive, or start a goroutine out of reflex? Can you explain why you wrapped an error instead of logging it and moving on? Can you say "I wouldn't use generics here" and back it up?

Concurrency: The Core of Every Senior Go Interview

Concurrency is where mid-level candidates lose offers. The classic mistake is starting one goroutine per unit of work, with no limit, no error path, and no way to stop it. Senior candidates start from a bounded pattern.

Goroutines are cheap, and that's what makes the naive approach tempting. From the Go FAQ:

The initial stack is about 2KB on most platforms and the runtime manages it, which is why a program can run hundreds of thousands of goroutines at once. Cheap isn't free, though. Unbounded goroutines eat memory, flood downstream services, and hide leaks. The usual fix is a worker pool.

Worker Pools

A worker pool starts a fixed number of goroutines and feeds them work through a channel. It's the standard answer to "process 10,000 URLs without opening 10,000 sockets at once."

example.gogo
package main

import (
	"fmt"
	"sync"
)

// fetchStatus stands in for any bounded I/O call (HTTP, DB, RPC).
func fetchStatus(url string) string {
	return "200 " + url
}

func main() {
	urls := []string{"a", "b", "c", "d", "e"}
	const workers = 3

	jobs := make(chan string)
	results := make(chan string)

	var wg sync.WaitGroup
	for range workers {
		wg.Go(func() {
			for url := range jobs {
				results <- fetchStatus(url)
			}
		})
	}

	// Close results once every worker has returned.
	go func() {
		wg.Wait()
		close(results)
	}()

	go func() {
		for _, url := range urls {
			jobs <- url
		}
		close(jobs)
	}()

	for r := range results {
		fmt.Println(r)
	}
}

Interviewers listen for three details:

  1. You close jobs so the workers' range loops end.
  2. You use a sync.WaitGroup to know when it's safe to close results.
  3. You close results from a separate goroutine so the main loop can drain it.

Get those right and you've shown you understand the whole thing.

Two newer details show you keep up with the toolchain:

  • for range workers ranges over an integer, which has worked since Go 1.22.
  • wg.Go, added in Go 1.25, replaces the old wg.Add(1) plus defer wg.Done() pair, and that removes the most common WaitGroup bug, forgetting one half of the pair.

Data Races and the Detector

Expect a "what's wrong with this code" question with a race in it. Races turn up in production code all the time, not only in interviews.

Uber published the numbers. Their Go monorepo has roughly 50 million lines of code across about 2,100 unique Go services. Their race detector found close to 2,000 data races, and 210 engineers fixed around 1,100 of them in six months (Uber Engineering).

The textbook race is a shared counter:

example.gogo
// BROKEN: concurrent writes to count are a data race.
func countBroken(items []int) int {
	count := 0
	var wg sync.WaitGroup
	for _, n := range items {
		wg.Add(1)
		go func() {
			defer wg.Done()
			if n%2 == 0 {
				count++ // unsynchronized write
			}
		}()
	}
	wg.Wait()
	return count
}

The right fix depends on the shape of the problem. A simple counter calls for sync/atomic or a sync.Mutex. Aggregation often works better with a channel, where each goroutine reports its result and one goroutine owns the total.

A senior answer names the tradeoff:

  • A mutex is easier to read.
  • Atomics are faster under contention.
  • A channel ("share memory by communicating") gets rid of the shared state altogether.

Then say "I'd run it with go test -race," because that habit catches races before they ship.

Fan-Out, Fan-In

Fan-out spreads work across goroutines, and fan-in merges their results back into one channel. You'd use it for parallel I/O feeding a single consumer, and it fits naturally with the worker pool above.

Candidates usually stumble on the merge step. Closing the merged channel needs a WaitGroup over the producers, the same as the worker pool's results channel. If you can explain why both patterns close their output the same way, you've shown you understand channel ownership and aren't just repeating a snippet.

Context: Cancellation and Deadlines

Go services pass context.Context down the whole call stack, and interviewers will ask you to use it correctly. The rules are that context is the first parameter, it's named ctx, and you never store it in a struct. It carries cancellation, deadlines, and request-scoped values across API boundaries.

The most common follow-up is "how do you stop a worker that's blocked on a slow call?" You select on both the work and ctx.Done():

example.gogo
func process(ctx context.Context, jobs <-chan string) error {
	for {
		select {
		case <-ctx.Done():
			return ctx.Err() // context.Canceled or DeadlineExceeded
		case job, ok := <-jobs:
			if !ok {
				return nil // channel closed, work done
			}
			if err := handle(ctx, job); err != nil {
				return fmt.Errorf("handling %q: %w", job, err)
			}
		}
	}
}

Returning ctx.Err() tells the caller why you stopped, so they can tell a deadline apart from a deliberate cancellation. Weaker answers ignore the context or only check it at the top of the loop. Then a goroutine stuck inside handle never sees the cancellation.

Strong candidates also mention that the parent has to call the cancel function returned by context.WithCancel or context.WithTimeout, usually with defer cancel(), to release resources.

Be ready for "what's the difference between context.WithCancel and context.WithTimeout?" The first cancels when you call cancel. The second also cancels once a deadline passes. You should defer cancel() either way, because leaking a context's internal goroutine is a resource leak too.

Error Handling the Senior Way

Error handling is the feature Go developers miss most from other languages. In 2025, 28% of respondents said Go was missing a feature they valued elsewhere, and error handling led that list (2025 Go Developer Survey).

That frustration is why interviewers test it. They want to see that you treat errors as values that mean something, not noise you log and forget.

The baseline is wrapping with %w so callers can inspect the chain:

example.gogo
var ErrNotFound = errors.New("not found")

func loadUser(ctx context.Context, id string) (*User, error) {
	row, err := db.Query(ctx, id)
	if err != nil {
		// Wrap, don't replace. The caller can still see the root cause.
		return nil, fmt.Errorf("loadUser %s: %w", id, err)
	}
	if row == nil {
		return nil, fmt.Errorf("loadUser %s: %w", id, ErrNotFound)
	}
	return row, nil
}

Then errors.Is checks for a sentinel value, and errors.As unwraps to a concrete type:

example.gogo
user, err := loadUser(ctx, id)
if errors.Is(err, ErrNotFound) {
	http.Error(w, "user not found", http.StatusNotFound)
	return
}

var validationErr *ValidationError
if errors.As(err, &validationErr) {
	http.Error(w, validationErr.Field+" is invalid", http.StatusBadRequest)
	return
}

Be ready to explain when to use which:

  • A sentinel with errors.Is fits when the caller only needs to know which error happened.
  • A typed error with errors.As fits when the caller needs data from it, like a field name or a status code.

Wrap with %w only when the wrapped error is really part of your API contract, because over-wrapping leaks implementation details.

Also say out loud that panic is for programmer bugs and unrecoverable startup failures, not for expected conditions like a missing record. Using panic for an ordinary error is a quick way to fail a senior screen.

Generics: Knowing When to Reach for Them

Generics arrived in Go 1.18. Here's how the Go team announced them:

Interviewers ask about generics to find out whether you can hold back. The honest answer is that most code doesn't need them, and the standard library's slices and maps packages already cover the common cases. Use type parameters when you'd otherwise copy the same logic for several types, or fall back to interface{} and lose type safety.

A good use is a constrained helper that the standard library doesn't already provide:

example.gogo
import "cmp"

// Clamp constrains v to the range [lo, hi] for any ordered type.
func Clamp[T cmp.Ordered](v, lo, hi T) T {
	if v < lo {
		return lo
	}
	if v > hi {
		return hi
	}
	return v
}

The cmp.Ordered constraint from the standard cmp package limits T to types that support < and >.

Your choice of example says something too. Don't write a generic Max. Go has had builtin max and min since 1.21, and slices.Max and slices.Min handle slices, so a hand-rolled version suggests you reach for generics out of habit. Clamp justifies its type parameter because nothing in the standard library does the same job.

Before generics, a function like this needed either one copy per type or interface{} with type assertions that could panic at runtime. Now the compiler checks it. But if the function only ever handles int, write it for int. Premature generalization is a smell in Go like anywhere else, and the interviewer is hoping you'll say so.

Interfaces and API Design

Interface questions test design taste, which is a big part of what "senior" means. The Go proverb to know here is "accept interfaces, return structs." A function should accept the narrowest interface it actually uses and return a concrete type, so callers keep their options open.

example.gogo
// Good: accepts the minimal behavior it needs.
func Copy(dst io.Writer, src io.Reader) (int64, error) {
	return io.Copy(dst, src)
}

Copy doesn't care whether src is a file, a network connection, or a buffer. Because it accepts io.Reader, it works with all of them. That's why io.Reader and io.Writer, with one method each, are the most reused interfaces in the language.

A few more points worth making:

  • Keep interfaces small, ideally one or two methods.
  • Define them in the package that consumes them rather than the one that implements them, so packages don't depend on each other for no reason.
  • Drop the habit, common in other languages, of putting an interface in front of everything. A struct with one implementation doesn't need an interface yet. Add one when a second implementation or a test double actually needs it.

Interviewers notice abstractions built on speculation, and that's the kind of code the 33% who struggle with idioms are dealing with (2025 Go Developer Survey).

The Live-Coding Round: Build a Rate Limiter

The live round usually asks for something small but concurrent. Rate limiters come up a lot because they combine goroutines, channels, time, and cleanup. A token-bucket limiter built on time.Ticker is short enough to write in the room and gives you plenty to talk about:

example.gogo
type Limiter struct {
	tokens chan struct{}
	stop   chan struct{}
}

func NewLimiter(perSecond int) *Limiter {
	l := &Limiter{
		tokens: make(chan struct{}, perSecond), // burst capacity
		stop:   make(chan struct{}),
	}
	ticker := time.NewTicker(time.Second / time.Duration(perSecond))
	go func() {
		defer ticker.Stop()
		for {
			select {
			case <-ticker.C:
				select {
				case l.tokens <- struct{}{}: // refill one token
				default: // bucket full, drop the tick
				}
			case <-l.stop:
				return
			}
		}
	}()
	return l
}

// Allow reports whether a request may proceed right now.
func (l *Limiter) Allow() bool {
	select {
	case <-l.tokens:
		return true
	default:
		return false
	}
}

func (l *Limiter) Close() { close(l.stop) }

The code matters less than how you talk about it:

  • Point out that the buffered tokens channel gives you burst capacity for free.
  • Explain that the inner select with a default drops refill ticks when the bucket is full instead of blocking.
  • Mention that Close stops the background goroutine so it doesn't leak, and that ticker.Stop() releases the timer.

Then bring up the alternative. In production you'd usually use golang.org/x/time/rate instead of writing this yourself, and knowing when to pick the standard solution over a custom one is part of the judgment they're hiring for.

FAQ

What topics come up most in a senior Go interview?

Concurrency, context, error handling, interfaces, and generics, in roughly that order. The weighting follows what Go developers build. 75% write API/RPC services and 62% write CLI tools (Go Developer Survey 2024 H2), and both kinds of work are concurrent and full of ways to fail.

No credible published statistic ranks how often specific questions come up, so be suspicious of any blog that claims one.

Do I need to know generics for a Go interview?

You should understand them, and it matters more that you know when not to use them. Generics shipped in Go 1.18 as the biggest change ever to the language (Go Blog), so they're fair game. Most idiomatic Go still avoids them, though, and senior candidates score points by explaining that the standard slices and maps packages cover most needs.

How important is the race detector?

Important enough that interviewers expect you to bring it up without being asked. Uber's race detector found close to 2,000 data races across their Go monorepo, and 210 engineers fixed about 1,100 of them over six months (Uber Engineering). Saying "I'd run go test -race" tells the interviewer you've worked on production code.

Which Go version should I target?

The current stable toolchain, which is Go 1.26 as of early 2026 (Go 1.26 release notes). Describing behavior from old versions dates you, for example claiming you need a three-clause loop to range over an integer. The for range n form has worked since Go 1.22.

Is Go still worth specializing in?

Yes. 17.4% of professional developers reported extensive work with Go in the past year (Stack Overflow Developer Survey 2025). In the official survey, 91% of respondents said they were satisfied with the language, and 63% said they were very satisfied (2025 Go Developer Survey). Demand for senior Go engineers follows that adoption.

Start Your Senior Go Path

Reading about these topics doesn't mean you can write them under pressure. Senior interviews reward muscle memory: a worker pool you can type without thinking, an error chain you wrap by reflex, a generic you know to leave out.

You get there by writing real Go every day on the current toolchain, with feedback on whether your code is idiomatic. That feedback is the hard part to find, and idioms are exactly what 33% of the Go community struggles with most.

LevelUpGo is built for that. Every lesson is an in-browser exercise that runs on the latest stable Go release and grades your code automatically, so you practice the way the interview tests you instead of just reading.

Here's where to practice each topic from this article:

  • Concurrency, context, and channels: the Go Fundamentals course builds up goroutines, channels, and cancellation from first principles. It's free to start and doesn't need a credit card.
  • Error handling, interfaces, and idioms: the Clean Go Code track has graded exercises on errors.Is/errors.As, small interfaces, and the design taste this article covers.
  • The full LevelUpGo roadmap shows how the courses build from fundamentals to senior-level design.

Start the free course, write Go every day until the interview, and you'll walk in able to explain your reasoning instead of guessing at it.

Write Go like a senior engineer

Interactive lessons in your browser. The first ones are free.

Try a free lessonOr create a free account