Exercises
Learn Go through hands-on exercises organized by difficulty and topic.
Concepts (01-37)
Learn Go fundamentals through focused exercises:
Basics (01-10)
- 01_hello - Hello, Go!
- 02_values - Values and Types
- 03_variables - Variables
- 04_constants - Constants
- 05_for - For Loops
- 06_if_else - If/Else Statements
- 07_switch - Switch Statements
- 08_arrays - Arrays
- 09_slices - Slices
- 10_maps - Maps
Functions & Structs (11-20)
- 11_functions - Functions
- 12_multi_return - Multiple Return Values
- 13_variadic - Variadic Functions
- 14_closures - Closures
- 15_recursion - Recursion
- 16_range_built_in - Range over Built-ins
- 17_pointers - Pointers
- 18_strings_runes - Strings and Runes
- 19_structs - Structs
- 20_methods - Methods
Advanced (21-37)
- 21_interfaces - Interfaces
- 22_enums - Enums
- 23_struct_embedding - Struct Embedding
- 24_generics - Generics
- 25_range_iterators - Range over Iterators
- 26_errors - Error Handling
- 27_custom_errors - Custom Errors
- 36_json - JSON Processing
- 37_xml - XML Processing
Projects (101-109)
Build real applications:
- 101_text_analyzer - Text analysis tool (Easy)
- 102_shape_calculator - Shape area calculator (Medium)
- 103_task_scheduler - Task scheduler (Hard)
- 104_http_server - HTTP server (Easy)
- 105_cli_todo_list - CLI todo list (Medium)
- 106_simple_chat_app - Chat application (Medium)
- 107_image_processing_utility - Image processing (Hard)
- 108_basic_key_value_store - Key-value store (Hard)
- 109_epoch - Time conversion (Beginner)
Getting Started
- List exercises:
./bin/golearn list
- Start an exercise:
./bin/golearn verify 01_hello
- Get hints:
./bin/golearn hint 01_hello
- Edit the template file and implement your solution
- Verify your solution:
./bin/golearn verify 01_hello