This repository contains Go practice exercises organized by difficulty level. Each exercise has pre-written test cases that you need to pass by implementing the corresponding functions.
This is a repository for practicing and learning GO; the idea is that you rely on official documentation, forums, Q&A platforms such as Stack Overflow, etc. Try not to let an AI agent solve everything for you. You can rely on it a little, but the idea is that you fully understand what you are developing.
./
├── 01_BASIC/
│ ├── 01_CALCULATOR/
│ ├── 02_STRING_UTILS/
│ └── 03_ARRAY_OPERATIONS/
├── 02_INTERMEDIATE/
│ ├── 04_BANK_ACCOUNT/
│ ├── 05_TODO_LIST/
│ ├── 06_FILE_PROCESSOR/
│ └── 07_HTTP_CLIENT/
├── 03_ADVANCED/
│ ├── 08_CONCURRENT_DOWNLOADER/
│ ├── 09_CACHE_SYSTEM/
│ └── 10_WEB_SCRAPER/
└── 04_AI/
├── 11_SENTIMENT_ANALYZER/
├── 12_IMAGE_CLASSIFIER/
└── 13_CHATBOT_ENGINE/
- For each exercise, browse to the corresponding directory
- Read the
README.md
file to understand the requirements - Run the tests with
go test
to see which functions you need to implement - Implement the functions in the corresponding file until all tests pass
- The tests are designed to guide you step by step in the implementation
- Files:
01_BASIC/01_CALCULATOR/
- Difficulty: ⭐
- Concepts: Basic functions, math operations, error handling
- Files:
01_BASIC/02_STRING_UTILS/
- Difficulty: ⭐
- Concepts: Strings handling, slices, loops
- Files:
01_BASIC/03_ARRAY_OPERATIONS/
- Difficulty: ⭐⭐
- Concepts: Slices, arrays, basic algorithms
- Files:
02_INTERMEDIATE/04_BANK_ACCOUNT/
- Difficulty: ⭐⭐
- Concepts: Structs, methods, encapsulation
- Files:
02_INTERMEDIATE/05_TODO_LIST/
- Difficulty: ⭐⭐
- Concepts: Structs, slices, CRUD operations
- Files:
02_INTERMEDIATE/06_FILE_PROCESSOR/
- Difficulty: ⭐⭐⭐
- Concepts: File I/O, error handling, string processing
- Files:
02_INTERMEDIATE/07_HTTP_CLIENT/
- Difficulty: ⭐⭐⭐
- Concepts: HTTP requests, JSON, error handling
- Files:
03_ADVANCED/08_CONCURRENT_DOWNLOADER/
- Difficulty: ⭐⭐⭐⭐
- Concepts: Goroutines, channels, concurrency
- Files:
03_ADVANCED/09_CACHE_SYSTEM/
- Difficulty: ⭐⭐⭐⭐
- Concepts: Maps, mutex, concurrency, TTL
- Files:
03_ADVANCED/10_WEB_SCRAPER/
- Difficulty: ⭐⭐⭐⭐⭐
- Concepts: HTTP, HTML parsing, goroutines, channels
- Files:
04_AI/11_SENTIMENT_ANALYZER/
- Difficulty: ⭐⭐
- Concepts: Text procesing, sentiment analisis, dictionaries
- Files:
04_AI/12_IMAGE_CLASSIFIER/
- Difficulty: ⭐⭐⭐⭐
- Concepts: Computer vision, pre-trained models, GoCV
- Files:
04_AI/13_CHATBOT_ENGINE/
- Difficulty: ⭐⭐⭐⭐⭐
- Concepts: Natural Lnguage Process, conversation context, External APIs
# Execute tests of specific exercise
cd 01_BASIC/01_CALCULATOR && go test
# Executes tests with verbose output
go test -v
# Execute all project tests
go test ./...
# Check coverage
go test -cover
- Red: Run the test and see the fails
- Green: Write the minimal code to pass the test
- Refactor: Refactor the code to improve readability and maintainability
¡Happy coding!