Goforgo
Learn Go interactively like Rustlings
Install / Use
/learn @stonecharioteer/GoforgoREADME
GoForGo 🚀
Interactive Go tutorial CLI inspired by Rustlings 📚

GoForGo helps you learn Go by fixing broken code exercises with real-time feedback. It features 234 exercises covering Go fundamentals through advanced real-world topics including Kubernetes, big data, DevOps integration, third-party library ecosystem, and common Go pitfalls, all with a beautiful terminal interface. All exercises are embedded in the binary — just go install and start learning.
🎬 Demo
Experience GoForGo's elegant interface: animated splash screen, comprehensive welcome screen, real-time file watching, progressive hints, and smart progress tracking with uniform styling across all pages.
✨ Features
- 🎯 234 Interactive Exercises - From basics to advanced real-world Go development
- 👁️ Real-time File Watching - Automatic compilation and feedback as you code
- 🎨 Beautiful TUI - Clean terminal interface with progress tracking
- 📚 Progressive Learning - Structured curriculum with difficulty levels
- 💡 Smart Hints - Context-aware hints that adapt to your attempts
- 🧪 Advanced Testing - Universal validation system with container integration
- 🔧 Modern Go - Latest Go 1.24+ features and best practices
- 📦 Complete Ecosystem - Third-party libraries, Kubernetes, big data, DevOps tools
- ☸️ Kubernetes Mastery - client-go, CRDs, controllers, operators
- 🚀 Big Data & DevOps - Kafka, Hadoop, Spark, Elasticsearch integration
🚀 Quick Start
Option 1: Go Install (Recommended)
go install github.com/stonecharioteer/goforgo/cmd/goforgo@latest
# Initialize exercises in your learning directory
mkdir ~/learn-go && cd ~/learn-go
goforgo init
# Start learning!
goforgo
All 234 exercises and solutions are embedded in the binary — no repo clone needed.
Option 2: Build from Source
git clone https://github.com/stonecharioteer/goforgo.git
cd goforgo
just build # or: go build -o bin/goforgo ./cmd/goforgo
mkdir ~/learn-go && cd ~/learn-go
~/path/to/goforgo/bin/goforgo init
🎮 Usage
Initialize Your Learning Environment
goforgo init
This creates:
exercises/- 234 Go exercises organized by topicsolutions/- Complete reference solutions.goforgo.toml- Your progress and preferences
Start Interactive Mode (Default)
goforgo
This launches the interactive mode with:
- ⚡ Real-time file watching and compilation
- 📊 Progress tracking and visual feedback
- ⌨️ Keyboard shortcuts for navigation
- 💡 Progressive hints and guidance
Run Specific Exercises
goforgo run hello # Run the 'hello' exercise
goforgo run # Run next incomplete exercise
goforgo hint variables1 # Show hint for specific exercise
goforgo list # List all exercises with progress
goforgo list --all # Show completed exercises too
Testing Helpers
goforgo solve 5 # Copy solution into exercise 5
goforgo solve 3-7 # Solve exercises 3 through 7 (inclusive)
goforgo sync # Re-validate all exercises, update progress
goforgo clean # Remove build artifacts from exercise dirs
solve copies the reference solution over the exercise file and marks it complete — useful for quickly advancing through exercises you've already understood. sync re-runs every exercise and updates progress to match reality (marks passing exercises complete, unmarks failing ones).
In the TUI list view, press r to run a sync and refresh the list in-place.
Available Commands
| Command | Description |
| --------------------------------------- | ------------------------------------------------- |
| goforgo | Start interactive watch mode (default) |
| goforgo init | Initialize exercises in current directory |
| goforgo run [exercise] | Run specific exercise or next incomplete |
| goforgo hint [exercise] | Show progressive hints |
| goforgo list [--all] [--category=...] | List exercises with filters |
| goforgo watch | Explicit watch mode with file monitoring |
| goforgo solve <N or X-Y> | Copy solutions over exercises for a range |
| goforgo sync | Re-validate all exercises and update progress |
| goforgo clean | Remove build artifacts from exercise directories |
🏗️ Building from Source
Prerequisites
- Go 1.24+ (required for latest language features)
- Just (recommended) - Install from casey/just
- Git for version information
Development Setup
# Clone repository
git clone https://github.com/stonecharioteer/goforgo.git
cd goforgo
# Install development dependencies
just install-deps
# Build for development
just dev-build
# Run tests
just test
# Build optimized release binary
just build
Available Just Commands
just --list # Show all available commands
# Building
just build # Build optimized binary
just dev-build # Fast development build
just build-race # Build with race detection
just build-release # Cross-platform release binaries
# Testing & Quality
just test # Run all tests
just test-coverage # Generate coverage report
just bench # Run benchmarks
just lint # Lint code with golangci-lint
just fmt # Format code
# Development
just dev-run # Build and test CLI in demo mode
just test-cli # Test CLI functionality
just watch # Auto-rebuild on changes (requires entr)
just pre-commit # Full check before committing
# Maintenance
just clean # Clean build artifacts
just tidy # Tidy Go modules
just info # Show project information
Manual Build (without Just)
# Basic build
mkdir -p bin
go build -o bin/goforgo ./cmd/goforgo
# With version information
go build -ldflags="-X 'github.com/stonecharioteer/goforgo/internal/cli.version=v1.0.0'" -o bin/goforgo ./cmd/goforgo
# Cross-platform builds
GOOS=linux GOARCH=amd64 go build -o dist/goforgo-linux-amd64 ./cmd/goforgo
GOOS=darwin GOARCH=amd64 go build -o dist/goforgo-darwin-amd64 ./cmd/goforgo
GOOS=windows GOARCH=amd64 go build -o dist/goforgo-windows-amd64.exe ./cmd/goforgo
📚 Exercise Categories
GoForGo includes 234 exercises across 57 categories:
Core Go Fundamentals (76 exercises)
- 01_basics - Hello world, syntax, comments, program structure (10 exercises)
- 02_variables - Types, declarations, zero values, constants (9 exercises)
- 03_functions - Parameters, returns, methods, closures (12 exercises)
- 04_control_flow - if/else, loops, switch, defer, panic/recover (10 exercises)
- 05_arrays - Fixed-size collections, iteration, sorting (5 exercises)
- 06_slices - Dynamic arrays, capacity, tricks (6 exercises)
- 07_maps - Key-value structures, patterns, performance (5 exercises)
- 08_structs - Custom types, embedding, methods (4 exercises)
- 09_interfaces - Type satisfaction, composition, assertions (4 exercises)
- 10_errors - Error handling patterns, wrapping, custom errors (3 exercises)
- 11_concurrency - Goroutines, channels, context patterns (5 exercises)
- 12_generics - Type parameters, constraints, inference (3 exercises)
Advanced Go Features (68 exercises)
- 13_testing - Units, benchmarks, test doubles, fuzzing (5 exercises)
- 14_stdlib - Standard library utilities, time, strings, regex (3 exercises)
- 15_json - Encoding, decoding, streaming, validation (3 exercises)
- 16_http - Servers, clients, middleware patterns (3 exercises)
- 17_files - I/O operations, permissions, file watching (3 exercises)
- 18_regex - Pattern matching, parsing, advanced expressions (3 exercises)
- 19_reflection - Type inspection, dynamic calls, practical applications (3 exercises)
- 20_advanced - Design patterns, context patterns, pipeline patterns (3 exercises)
- 21_crypto - Hashing, encryption, digital signatures (3 exercises)
- 22_net - TCP/UDP servers, HTTP clients, networking (5 exercises)
- 23_encoding - Base64, JSON processing, data encoding (3 exercises)
- 24_io - Buffered I/O, interfaces, streaming patterns (3 exercises)
- 25_paths - File paths, directory operations (3 exercises)
- 26_os - Environment, process management, signals (3 exercises)
- 27_math - Geometry, statistics, number theory (3 exercises)
- 28_sorting - Search algorithms, sorting comparison (3 exercises)
- 29_data_structures - Linked lists, stacks, queues, trees (3 exercises)
- 30_algorithms - Dynamic programming, graph algorithms, pattern matching (3 exercises)
- 31_web - Web servers, middleware patterns, WebSocket (3 exercises)
Real-World Patterns (9 exercises)
- 32_microservices - Service discovery, circuit breakers, distributed tracing (3 exercises)
- 33_databases - SQL operations, connection pooling, NoSQL (3 exercises)
-
