$ show barelyhuman/goblin
Goblin is a web application that serves as a Go binary distribution service, allowing users to download and install Go binaries without having Go installed locally. The application consists of a Go-based HTTP server that resolves package versions from the Go proxy and GitHub, compiles binaries for requested OS/architecture combinations, and serves them to users. It includes a web frontend for documentation and usage examples, Docker configuration for easy deployment, and optional caching via S3-compatible storage. The architecture follows a standard web service pattern with clear separation between API handling, version resolution, binary building, and storage layers.
The LLM identified 3 files worth highlighting for reuse:
Implements sophisticated version resolution with fallback mechanisms. First attempts to resolve versions via the Go proxy, then falls back to GitHub tags if needed. Handles both semantic versions and commit hash references, with proper constraint checking for version ranges. This component demonstrates good error handling and separation of concerns.
Main HTTP server that orchestrates the entire flow: handles incoming requests, routes to appropriate handlers (version resolution, binary serving, static files), implements rate limiting, manages background cache cleanup, and integrates with optional storage. Shows good structure with clear separation of concerns between HTTP handling and business logic.
Provides a clean abstraction over S3-compatible storage (specifically MinIO) with methods for uploading, checking existence, getting signed URLs, listing objects, and cleanup. Implements the Storage interface properly and handles bucket initialization. This component could be easily reused in other projects needing S3 storage integration.