Mentoring Go Developers Across Experience Levels
Teaching concurrency, errors, and testing effectively.
Search across all documentation pages
Teaching concurrency, errors, and testing effectively.
Mentoring on Go teams is how idioms outlive any single senior hire.
Structured plans beat ad-hoc advice: juniors need safe baselines, mids need concurrency fluency, seniors need design ownership, and staff candidates need multi-team teaching leverage.
Effective mentoring matches exercises to leveling expectations.
Juniors practice gofmt, table tests, and explicit error returns.
Mid-level engineers pair on context, channels, and interface boundaries.
Seniors co-own design reviews and ADR drafts.
Staff-track engineers demonstrate cross-package patterns through reference PRs and review calibration.
Every level benefits from artifacts - merged PRs, test files, doc notes - not verbal promises to improve.
Quick-reference recipe card - copy-paste ready.
## Mentoring plan - <name> - <level>
Quarter goal:
Week 1-4: <skill> -> artifact PR
Week 5-8: <skill> -> artifact PR
Review themes to watch: errors, concurrency, API exports
Buddy rotation: <engineer> by week 6When to reach for this:
Mentor guides a mid-level engineer through concurrency in a real queue consumer.
func TestWorkerRespectsCancel(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
w := NewWorker(fakeSender{delay: 50 * time.Millisecond})
done := make(chan error, 1)
go func() { done <- w.Run(ctx) }()
time.Sleep(10 * time.Millisecond)
cancel()
select {
case err := <-done:
if !errors.Is(err, context.Canceled) {
t.Fatalf("got %v want cancel", err)
}
case <-time.After(time.Second):
t.Fatal("worker did not stop")
}
}// Mentor asks author to add -race in CI job comment on PR
// go test -race ./internal/worker/...What this demonstrates:
context cancellation is verifiable in unit tests| Level | Emphasis | Sample artifact |
|---|---|---|
| Junior | Toolchain, table tests, error returns | Docs+test first PR |
| Mid | context, interfaces at consumer, -race | Worker or handler PR |
| Senior | Design input, ADR draft, review teaching | RFC comments + ADR |
| Staff track | Cross-team library, review calibration | Shared middleware PR |
// Error lab: mentee refactors to %w and adds errors.Is test
var ErrNotFound = errors.New("not found")
func TestIsNotFound(t *testing.T) {
err := fmt.Errorf("load: %w", ErrNotFound)
if !errors.Is(err, ErrNotFound) {
t.Fatal("expected ErrNotFound in chain")
}
}io.Reader style examples from their codebase.errgroup before raw channel orchestration for most service code.go test -race on packages touched; explain a past race found in prod if available.net/http, context, and testing before chi/gin exceptions.| Alternative | Use When | Don't Use When |
|---|---|---|
| Mob programming | Complex concurrency change | Mentee needs solo ownership practice |
| External workshop | Team-wide Effective Go refresh | Individual gap on your codebase |
| Self-serve reading path | Hire is self-directed | Concurrency/errors need live feedback |
| Formal training budget | Company offers Go courses | No follow-up PR application |
Roughly 2-4 hours per week across plans and pairing; scale down feature ownership accordingly.
Tie pairing to concrete PR deadlines and leveling evidence; escalate to manager if avoidance persists.
Focus on org context: ADRs, deploy constraints, on-call patterns - learn from their idioms while supplying system knowledge.
Sometimes for teaching, but rotate approvers so review bar reflects team norms not one voice.
Shrink scope to a library-sized exercise, require -race green, and second reviewer on next three concurrent PRs.
No. Manager 1:1s cover career and feedback; mentoring sessions are technical with agendas and artifacts.
Quarterly note: PR links, skills demonstrated, gaps for next quarter - feeds promotion packets.
Yes on docs, tests, and tooling they mastered - strengthens teaching skill without owning concurrency review.
Effective Go and your internal ADR index beat random blogs; assign reading blocks with exercise PRs.
Async review comments plus recorded pairing summaries; keep overlapping live hour for complex topics.
When agreed artifacts miss deadlines repeatedly after scope adjustment - involve manager with evidence.
Model cross-team RFCs, calibrate review tone, and co-facilitate disagreement sessions.
Stack versions: This page was written for Go 1.26.x (Green Tea GC default, go fix modernizers - verify patch at build), chi (latest - verify at build), gin (latest - verify at build), echo (latest - verify at build), google.golang.org/grpc (latest - verify at build), sigs.k8s.io/controller-runtime (latest - verify at build), kubebuilder (latest - verify at build), tinygo (latest - verify board targets at build), wazero (latest - verify at build), and golangci-lint (latest - verify linter set at build).
Reviewed by Chris St. John·Last updated Jul 16, 2026