Files
Sam Morrow 47412e5c4b
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
MCP Server Diff / mcp-diff (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
Refactor buffer processing for clarity and add edge case tests
- Extract storeLine() and accumulate() helper closures to eliminate
  duplicated line processing and truncation logic
- Simplify main loop by using early return pattern (newlineIdx < 0 -> break)
- Add test for empty response body edge case
- Add test for exact maxLineSize boundary condition (10MB)

The refactored code reduces nesting and makes the flow clearer:
accumulate handles byte collection with truncation detection,
storeLine handles ring buffer storage with truncation markers.
2026-01-27 12:20:47 +01:00
..