Basics of Go language
| # | Topic | Description |
|---|---|---|
| 01 | Hello World | Your first Go program - printing "Hello World" to the console |
| 02 | Variables | Learn Go data types (string, int, float, bool, etc.), variable declaration using var, const, and shorthand := |
| 03 | Packages | Import and use built-in packages (fmt, math) and create custom packages (utils module) |
| 04 | Functions | Define functions with parameters and return types; function calls and basic arithmetic operations |
| 05 | Arrays & Slices | Fixed-size arrays vs dynamic slices; indexing, slicing, and length operations |
| 06 | Conditionals | If/else statements and switch cases for control flow |
| 07 | Loops | For loop variations: condition-based, C-style, and practical examples (FizzBuzz) |
| 08 | Maps | Key-value pairs; creating, accessing, deleting map entries; checking map length |
| 09 | Range | Iterating over slices and maps using the range keyword with index and value |
| 10 | Pointers | Memory addresses, dereferencing with *, and modifying values through pointers |
| 11 | Closures | Anonymous functions and closures - functions that access outer scope variables |
| 12 | Structs | Custom data types, struct methods, value/pointer receivers, and modifying struct state |
| 13 | Interfaces | Define contracts with interfaces; implement multiple types satisfying the same interface |
| 14 | Web | Basic HTTP server with route handlers using the net/http package |
Build and run any lesson:
go run src/01_hello/main.go
go run src/02_variables/main.go
# ... etcOr build a binary:
go build -o bin/hello src/01_hello/main.go