mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-09-07 15:07:17 +00:00
Go 1.27 changed how runtime.FuncForPC reports the symbol for HandleWeb()'s returned closure: it now correctly attributes it to its defining function (handlers.(*Server).HandleWeb) instead of leaking the inlining call site's enclosing function name (setupRouter) the way older Go versions did. The registered route itself is unchanged -- this is purely a difference in the introspected debug name. The test's cleanup logic had a dedicated special case for stripping a leading "setupRouter" prefix, added to work around exactly that inlining artifact. Verified empirically (temporarily instrumented with the raw runtime.FuncForPC output, then diffed the full 299-route table with the special case removed) that the general prefix-stripping loop already produces an identical result for the remaining legitimate cases (closures actually defined inline in setupRouter, e.g. /favicon.ico) -- so the dedicated case was already redundant before this Go bump and can be dropped. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>