Day 8 — Gate I: Core Language Checkpoint

Updated

July 30, 2025

Day 8 — Gate I: Core Language Checkpoint

Today is your first gate. Review everything from Days 1–7 and verify you can work confidently with Go’s core language features.

Self-assessment checklist

  • Set up a Go module from scratch (go mod init)
  • Declare variables with both var and :=, understand zero values
  • Write functions with multiple returns, named returns, and variadic parameters
  • Use if, switch, for (including range) confidently
  • Create and manipulate slices (append, copy, reslicing)
  • Use maps with comma-ok pattern
  • Define structs with methods (value and pointer receivers)
  • Understand pointer semantics and escape analysis basics
  • Organize code into packages with proper visibility
  • Define and implement interfaces (implicit satisfaction)
  • Use type assertions and type switches
  • Handle errors idiomatically (error interface, wrapping with %w, errors.Is/As)
  • Use panic/recover appropriately (rare cases only)
  • Understand Go modules (go.mod, go.sum, go get, go mod tidy)
  • Write table-driven tests with t.Run() subtests
  • Create test fakes/mocks using interfaces

Gate project

Build a CLI tool that:

  1. Accepts command-line arguments
  2. Uses at least 3 custom types with methods
  3. Implements at least 1 interface
  4. Has proper error handling (no panics for expected errors)
  5. Includes table-driven tests with >80% coverage
  6. Is organized into multiple packages

Run go vet and go test -race ./... — both must pass cleanly.

Tip

If any checklist item feels uncertain, revisit that day’s material before proceeding to Stage II.