Go Mini Wiki: Zero-Dependency File-Based Web Application
The Systems Logic: The service utilises Go’s native http.ServeMux for pure standard library routing. To centralise route checking and maintain security bounds, I implemented Higher-Order Functions (MakeHandler) that trap incoming paths inside closure wrappers. Data storage maps directly onto the local file system using native os I/O routines, matching markdown assets directly to disk storage patterns. The initialisation layer showcases modern Go practices by integrating the standard log/slog package to provide structured runtime diagnostic data during boot sequences.
The Forge Specs
- ✦ Pattern: Higher-order Closures for centralised request parsing and middleware-like orchestration.
- ✦ Security: Regex-validated route isolation combined with automatic HTML context escaping via html/template.
- ✦ Persistence: File-system storage engine mapping data securely to local text structures with explicit 0600 file permissions.
- ✦ Diagnostics: Integrated structured log/slog text-handlers for clear, searchable initialisation tracking.
- ✦ Architecture: Framework-independent design with a zero-dependency footprint to minimise compilation bloat and eliminate maintenance debt.
- ✦ Deployed: Fully hosted on Render (Cold starts may apply).