用 Go 重构 Markdown 加载:从 Nuxt Content 到独立数据 API
记录如何把博客 Markdown 内容加载从 Nuxt Content 中拆出,用 Go 实现独立数据 API:动机、双语内存存储与语言回退、内容上线路径、实测数据、适用边界(何时该上数据库)与已知约束(完整代码见仓库)。
A Nuxt.js SSR Memory Leak Postmortem: How One Global Variable Crippled a 2GB Server
From a cloud disk alert and unresponsive SSH, this postmortem digs through Swap, containers, and the Node process to find the real culprit: a module-level global state leak in a Nuxt.js SSR app—plus the fix and verification.
Memory: Multi-Session Facts and Lightweight RAG (Part 5)
Giving the agent two kinds of memory: cross-session key-value facts (remember/recall, persisted to a JSON file) and lightweight RAG over local notes (embed → cosine → topK), with measurements showing why a fixed similarity threshold and the embedding prefix are the two most over-trusted details.
Service & Migration: Turning the Agent into a Streaming API You Can Move to the Cloud (Part 4)
Turning the agent loop into a long-running HTTP service: per-token pushes over SSE and a multi-round event stream, with the same code switching from local Ollama to an OpenAI-compatible cloud endpoint by changing an environment variable.
The Loop: Letting the Agent Decide How Many Tools to Call (Part 3)
Upgrading a single round into a loop: multi-tool registration, several parallel tool_calls in one round, feeding tool errors back, history trimming — so that the agent itself decides how many tools to call.
Minimal Code: The Complete Single-Tool, Single-Round Loop (Part 2)
Running the minimal tool-calling loop in about 200 lines of Go (standard library only) — the model names a tool, Go executes it, the result goes back, the model answers — and spelling out the four iron rules of Ollama's “approximately compatible” /v1.
Environment & Operations: Installing Ollama on an Intel Arc A770 and Keeping It Stable Long-Term (Part 1)
Getting Ollama installed on an Intel Arc A770 and keeping it stable over the long run: mirror install, lighting up the GPU through Vulkan, model selection, measured performance, and a long-term operations handbook (monitoring, environment variables, troubleshooting order) that is required reading before going live.
All Tests Green, Component Still Broken — the Visual & A11y Blind Spots jsdom Can't See
497 unit tests all green, yet the Tooltip never appears on hover and the Select's screen reader can't announce the highlighted option. A two-part post-mortem: jsdom renders no pixels and enforces no ARIA spec, so these blind spots can only be covered by e2e computed-style assertions, pixel snapshots, and spec review. With reproducible minimal examples.
GORM Engineering in Practice (Part 2): Reliability & Production Readiness
Part 7 (series finale): a unified error middleware with ok/fail responses (slog, timeout 504), sort whitelists, file-header sniffing behind an Uploader abstraction, and connection-pool tuning. Ends with a mapping table of every promise the series made and where it landed.
GORM Engineering in Practice (Part 1): Layering, Dependency Injection & Testability
Part 6: refactors the flat db.DB code of the first five parts into Repository / Service / Handler layers (internal/ + constructor injection), tests handlers with a fake repository + httptest table-driven tests, and (optional reading) wraps the pagination boilerplate into a generic GetPaginated[T].