mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-11 03:38:07 +00:00
unquoteLiteral only strips surrounding quotes, so an interpreted Go
string kept its escape sequences verbatim: r.Group("/api\x2fv1") was
recorded as /api\x2fv1 although the runtime registers /api/v1. The
ingestion extractor already decodes Go strings fully (strconv.Unquote
semantics: simple/hex/octal/\u/\U escapes, raw-string carriage returns,
fail-closed on undecodable bytes), so the graph and the source-scan
plugin disagreed on the same route's contract id — both survive the
merge as a wrong-path duplicate.
Extract that decoding into route-extractors/go-shared.ts and use it
from both layers: go-gin-echo.ts imports it unchanged, and every
string capture in the group Go plugin (group prefixes, framework paths,
HandleFunc, http client, NewRequest, resty) now goes through it.
Raw (backtick) strings keep Go semantics: no escape processing.
Covers it with two tests: hex escapes decoded in a prefix and a route
path, and escapes left literal inside a raw-string prefix.
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| fixtures | ||
| helpers | ||
| integration | ||
| unit | ||
| utils | ||