Day 8 — Gate I: Core Language Checkpoint
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
varand:=, understand zero values - Write functions with multiple returns, named returns, and variadic parameters
- Use
if,switch,for(includingrange) 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 (
errorinterface, wrapping with%w,errors.Is/As) - Use
panic/recoverappropriately (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:
- Accepts command-line arguments
- Uses at least 3 custom types with methods
- Implements at least 1 interface
- Has proper error handling (no panics for expected errors)
- Includes table-driven tests with >80% coverage
- 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.