Michael Pratt, Joe Tsai, Daniel Martí, Johan Brandhorst-Satzkorn, Roger Peppe, Chris Hines, and Damien Neil · 2026年11月4日
AI 摘要 AI 生成,可能有误
This Go Blog post announces that the new encoding/json/v2 and encoding/json/jsontext packages are stable and generally available in Go 1.27, addressing long-standing shortcomings of the original encoding/json package, including behavioral flaws (such as accepting invalid UTF-8 and duplicate object member names), API deficiencies, and performance limitations that cannot be fixed within the Go 1 compatibility promise. The new architecture separates syntactic encoding/decoding (handled by jsontext with true streaming support) from semantic marshaling/unmarshaling (handled by json/v2), with options as first-class arguments and new streaming-oriented interfaces like MarshalJSONTo and UnmarshalJSONFrom. The v2 API is designed to fix these problems while remaining familiar enough that existing v1 usage can migrate with mostly the same behavior.
AI 摘要Marking the 17th anniversary of Go's open source release, the Go team reflects on a year that included Go 1.26 and Go 1.27, delivering improvements such as generic methods, a redesigned encoding/json/v2 with up to 10× faster unmarshaling, a production goroutine leak profiler, the default Green Tea garbage collector, experimental SIMD support, and post-quantum cryptography. The team also emphasizes rapid ecosystem defense, exemplified by an urgent security release addressing the eMudhra certificate key disclosure incident within hours. Throughout, Go aims to remain grounded in simplicity, reliability, efficiency, and compatibility while adapting to modern hardware and serving both human developers and AI-assisted development.
AI 摘要The Go security team responded to a critical PKI compromise involving eMudhra intermediate certificates whose weak private keys could be recovered in microseconds, potentially enabling attackers to impersonate any TLS server. Within roughly seven and a half hours of being notified, they shipped their first-ever URGENT track security release (Go 1.27.3 and 1.26.10) blocking trust in the compromised certificates. The team also outlined lessons learned, including plans to improve release efficiency and bring certificate revocation support parity to Linux, possibly via the upki project.
AI 摘要The 2026 Go Developer Survey is now open through November 3, and the Go team encourages all developers to participate since their feedback directly shapes the team's priorities. Last year's survey drew 5,379 responses, with the top frustration being adherence to best practices and Go idioms, which led to a rewritten go fix in Go 1.26 and additional modernizers in Go 1.27. Results from this year's survey will be shared on the Go blog in early 2027.
AI 摘要The Go team introduces interactive refactoring in gopls, powered by a newly proposed Language Server Protocol (LSP) capability that lets language servers ask users for input via dynamic, multi-step dialogs directly in their editors. This unlocks long-awaited refactorings such as adding or removing struct tags with custom conventions, implementing interfaces with dynamic symbol search, and moving declarations across files and packages. The feature was designed in collaboration with the Dart team as an open standard for all languages and editors, and is available in gopls v0.24.0 and the official VS Code Go extension v0.56.0.
AI 摘要This Go blog post explains why HTTP/1 connection reuse fails when response bodies are left unread: since HTTP/1 responses are sent sequentially, net/http can only reuse a connection after the current response body is read to the end, so closing an unread body forced clients through Go 1.26 to pay the cost of repeatedly establishing new TCP/TLS connections. Developers traditionally worked around this by manually draining response bodies, but doing so safely requires careful limits on bytes and time spent draining. Starting in Go 1.27, net/http.Transport automatically drains unread HTTP/1 response bodies asynchronously (up to 50 ms or 256 KB), so developers can simply close bodies as usual—a benchmark against index.golang.org improved from ~710 ms to ~150 ms, nearly 5 times faster.