-
-
Notifications
You must be signed in to change notification settings - Fork 655
Open
Labels
Description
Add Gorilla Mux HTTP Router Package Challenge Series
Issue Description
Create a comprehensive Gorilla Mux package challenge series to teach developers powerful HTTP routing in Go, covering everything from basic routing to advanced patterns used in production REST APIs and web services.
What needs to be implemented
Package Structure
Create packages/gorilla-mux/ with the following challenges:
-
Challenge 1: Basic Routing & Path Variables (Beginner)
- Setting up Mux router
- Route patterns and path variables
- Query parameters and form handling
- Build a simple REST API for a bookstore
-
Challenge 2: Advanced Routing & Middleware (Intermediate)
- Route constraints and matchers
- Subrouters and route grouping
- Custom middleware chains
- CORS and authentication middleware
-
Challenge 3: REST API Patterns & Validation (Intermediate)
- RESTful resource routing
- Content negotiation (JSON, XML)
- Request validation and error handling
- Build a complete blog API with CRUD operations
-
Challenge 4: Production Features & Testing (Advanced)
- Route testing and HTTP testing
- Rate limiting and throttling
- API versioning strategies
- Graceful shutdown and health checks
Required Files for Each Challenge
README.md- Challenge description and requirementssolution-template.go- Starting code template with TODOssolution-template_test.go- Comprehensive test suitelearning.md- Educational content (400+ lines)hints.md- Step-by-step guidancemetadata.json- Challenge metadatago.modandgo.sum- Dependenciesrun_tests.sh- Testing script
Package Metadata (package.json)
{
"name": "gorilla-mux",
"display_name": "Gorilla Mux HTTP Router",
"description": "Powerful HTTP router and URL matcher for building Go web servers",
"version": "v1.8.1",
"github_url": "https://github.com/gorilla/mux",
"documentation_url": "https://pkg.go.dev/github.com/gorilla/mux",
"stars": 20000,
"category": "web",
"difficulty": "beginner_to_advanced",
"prerequisites": ["basic_go", "http_concepts", "rest_api"],
"learning_path": [
"challenge-1-basic-routing-variables",
"challenge-2-advanced-middleware",
"challenge-3-rest-patterns-validation",
"challenge-4-production-testing"
],
"tags": ["http", "router", "rest", "api", "web", "middleware"],
"estimated_time": "5-7 hours",
"real_world_usage": [
"REST API development",
"Web service backends",
"Microservice routing",
"API gateways",
"Content management systems",
"E-commerce platforms"
]
}Learning Objectives
- Master HTTP routing with Gorilla Mux
- Learn advanced routing patterns and constraints
- Implement middleware chains and authentication
- Build production-ready REST APIs
- Understand API design best practices
- Practice comprehensive HTTP testing
Resources
Acceptance Criteria
- All 4 challenges implemented with complete file structure
- Each challenge demonstrates different routing patterns
- Comprehensive HTTP tests covering all endpoints
- Learning materials explain REST API best practices
- Code follows existing repository patterns and style
- Examples of middleware implementation and testing
- Documentation covers production deployment considerations
Getting Started
- Study existing package challenges structure
- Review Gorilla Mux documentation and examples
- Set up sample REST API for testing
- Follow the package challenge guidelines from
CONTRIBUTING.md - Start with basic routing and progress to advanced patterns
Need Help?
- Check out our Contributing Guidelines
- Look at existing package implementations for patterns
- Ask questions in the comments below