Frontend Labs
⋯

Day 30 — Phase 1 Review & Code Audit

Learning Objectives

  • Apply consistent error handling across all Phase 1 code
  • Find and fix goroutine leaks with -race
  • Document technical debt before moving to networking

Review Checklist

For each file:
[ ] All errors checked (no _ for error returns)
[ ] All goroutines have an exit path (channel close, ctx.Done(), or timeout)
[ ] All net.Conn / os.File / http.Response.Body have defer Close()
[ ] No global mutable state without sync.Mutex or sync/atomic
[ ] No panic() in library code (only main and tests)
[ ] Contexts propagated through all function calls
[ ] Tests cover error paths, not just happy path
[ ] go test -race passes
[ ] go vet passes

Run the full check:

go vet ./...
go test -race ./...
go test -bench=. -benchmem ./...

Generated from week4.md · 8 Oct 2026 16:36