# Go Standard Library: net/http ServeMux, context, sync & Go 1.24 > Official Go 1.22 to 1.24 standard library idioms: method+wildcard http.ServeMux routing, loopvar scoping, context timeouts, and errgroup/atomic. ## Corpus Summary - Canonical Space URL: https://voxell.ai/p/go-stdlib - Documents indexed: 4 (42 passages, 50.8 KB) - Citation Readiness (Aggarwal GEO): 58/100 (stat_density=0.00, self_contained=0.80) - Full machine-readable corpus bundle: https://voxell.ai/s/go-stdlib/llms-full.txt ## Agent & MCP Integration (Zero API Key Required) Connect any MCP client or autonomous agent directly via Streamable HTTP: - Endpoint: `POST https://voxell.ai/s/go-stdlib/mcp` - Tools: `search_verified_docs` (grounded passage search), `ask_cited_answer` (cited synthesis) ```bash curl -sS -X POST https://voxell.ai/s/go-stdlib/mcp \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_verified_docs","arguments":{"query":"key facts and specifications","top_k":5}}}' ``` ## Document & Section Map - **official_ref_1_effective_go_the_go_programm.md** (37 passages, 48.1 KB) - **go-122-124-http-servemux-and-loopvars.md** (1 passages, 654 B) - Section: Go 1.22 - 1.24 Standard Library net/http ServeMux & Concurrency - **official_ref_2_raw_githubusercontent_com_go.md** (3 passages, 1.5 KB) - Section: raw.githubusercontent.com/golang/go/master/README.md - Section: The Go Programming Language - Section: Contributing - **go-context-and-goroutine-lifecycle.md** (1 passages, 557 B) - Section: Go Context Propagation, Goroutine Lifecycles & sync/atomic ## Verified Sample Citations (High Fact Density) - **[official_ref_2_raw_githubusercontent_com_go.md #1]**: # The Go Programming Language Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. ![Gopher image](https://golang.org/doc/gopher/fiveyears.jpg) *Gopher image by [Renee French][rf], licensed under [Creative Commons 4.0 Attribution license][cc4-by].* Our canonical Git repository is located at https:... - **[official_ref_2_raw_githubusercontent_com_go.md #2]**: ### Contributing Go is the work of thousands of contributors. We appreciate your help! To contribute, please read the contribution guidelines at https://go.dev/doc/contribute. Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language. [r... - **[go-122-124-http-servemux-and-loopvars.md #0]**: # Go 1.22 - 1.24 Standard Library net/http ServeMux & Concurrency `net/http.ServeMux` natively supports HTTP method prefixes and path wildcards without third-party routers: - `mux.HandleFunc("GET /api/v1/items/{id}", ...)` extracts `r.PathValue("id")`. - `mux.HandleFunc("GET /files/{path...}", ...)` matches remainder segments. - `mux.HandleFunc("GET /{$}"... - **[go-context-and-goroutine-lifecycle.md #0]**: # Go Context Propagation, Goroutine Lifecycles & sync/atomic Pass `context.Context` as the first parameter (`ctx context.Context`), never stored inside a struct. Always call the `cancel()` function returned by `context.WithTimeout` / `context.WithCancel` (`defer cancel()`) to release timer resources immediately. In Go 1.22+, `for` loop variables are scope... - **[official_ref_2_raw_githubusercontent_com_go.md #0]**: # raw.githubusercontent.com/golang/go/master/README.md Source: https://raw.githubusercontent.com/golang/go/master/README.md