Core Language¶
The syntax and semantics that form the foundation of every Go program. If you're coming from another language, start here to understand how Go does things differently.
| # | Topic | What You'll Learn | Level |
|---|---|---|---|
| 1 | Variables, Constants & Data Types | var, :=, const, iota, zero values, type system |
Beginner |
| 2 | Operators & Expressions | Arithmetic, comparison, logical, bitwise, no ternary operator | Beginner |
| 3 | Control Flow | if, switch, for, range -- Go's minimal flow control |
Beginner |
| 4 | Functions | Multiple returns, variadic args, named returns, first-class functions | Beginner |
| 5 | Strings, Runes & UTF-8 | Immutable byte slices, Unicode handling, strings.Builder |
Beginner |
| 6 | Pointers | &, *, nil, no pointer arithmetic, value vs pointer semantics |
Beginner |
| 7 | Packages & Imports | Visibility (capital letter rule), internal/, standard library |
Beginner |
| 8 | Error Handling Basics | error interface, if err != nil, sentinel errors |
Beginner |
| 9 | Init Functions | Package initialization order, blank imports, init() vs constructors |
Intermediate |
Interview Quick Hits
- Go has no ternary operator, no while loop, and no exceptions
- Zero values mean every variable is usable without explicit initialization
- The capital letter export rule is enforced by the compiler
if err != nilis the most debated and most important Go pattern