Go / Basic: Values and Program Contracts
Go β Basic: Values and Program Contracts
Read, run, and reason about small Go programs and their data.
What you will learn
- Create and inspect a small standard-library module.
- Trace values, control flow, collections, and method calls.
- Distinguish successful results from explicit errors.
Tooling, Modules, and the Program Model
Follow a Go program from package source to an executable, and record language and toolchain choices explicitly.
Start learningTypes, Zero Values, and Conversions
Choose representations deliberately and explain what a variable contains before an explicit initializer is supplied.
Start learningFunctions and Control Flow
Turn calculations into small contracts and justify branches, loops, and deferred cleanup from explicit rules.
Start learningArrays, Slices, and Text Boundaries
Track length, capacity, backing storage, and text units instead of treating every sequence as an independent copy.
Start learningMaps, Structs, and Data Invariants
Choose keyed lookup and records deliberately, and preserve invariants without inventing map ordering or deep-copy guarantees.
Start learningMethods, Interfaces, and Errors
Use small behavioral contracts and explicit errors while keeping dynamic type, dynamic value, and nil distinct.
Start learning