How jrbueno/aoc-go works
Main Components
a. CLI Interface Layer
• Root Command Handler (from cmd/root.go)
• Run Command Handler (from cmd/run.go)
• Command-line argument parser
b. Solution Runner Core
• Solution Registry/Manager
• Year/Day Solution Loader
• Execution Engine
c. Solution Implementations
• Year-based organization
• Day-specific solutions
• Test implementations
┌─ User Input Layer ─────┐
• CLI Interface │
• (Cobra Framework) │
• ┬────────────┘
• ↓
┌─ Core Logic Layer ────┐
• Solution Manager │
• Execution Engine │
• ┬────────────┘
• ↓
┌─ Solution Layer ──────┐
• Year/Day Solutions │
• Test Cases │
• ┘
Component Relationships
• User input → CLI Interface (command/flags)
• CLI Interface → Solution Manager (year/day selection)
• Solution Manager → Specific Solution Implementation
• Solution Implementation ↔ Test Cases (bidirectional for verification)
Important Details
a. Command Flow:
• How commands flow from root.go to run.go
• How year/day parameters are passed
b. Solution Structure:
• Demonstrate the hierarchical organization (year → day)
• Relationship between solution files and their tests
c. Type System:
• Internal/types.go connections to both core and solution layers
Technical Specifications to Note
• Go-specific components
• Cobra CLI framework integration
• Test framework integration
• File system interaction for solution loading
The testing framework integration
Remember to indicate the Go module structure and any external dependencies (as shown in go.mod) that are crucial to the system's operation.