aboutsummaryrefslogtreecommitdiff
path: root/doc/next/6-stdlib
AgeCommit message (Collapse)Author
20 hoursbytes,strings: add CutLastqiulaidongfeng
Fixes #71151 Change-Id: I3b3d49c35b0fa2c1220d3f39bbd506cc072b52b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/764601 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Robert Griesemer <gri@google.com>
7 daysdoc/next: move 78137.md to the correct directoryNicholas S. Husin
The release note was put in the wrong directory in the original CL 754960. Updates #78137 Change-Id: I6b3b776214c7fa3d90f2ec919072d3016a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/763900 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Nicholas Husin <nsh@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Nicholas Husin <husin@google.com>
7 daysgo/types: Hasher, a hash function for TypesAlan Donovan
This CL defines a hash function for Types using the maphash.Hasher API proposed in #70471 (CL 657296) that is consistent with the equivalence relation of types.Identical. It also defines a variant, HasherIgnoreTypes, that is consistent with types.IdenticalIgnoreTags. (The actual hash functions are identical: both ignore tags.) The logic of the hash function was derived from golang.org/x/tools/go/types/typeutil.Hash. + test, doc, relnote Fixes #69420 Updates #70471 Change-Id: I1947cda6aec229d56eeda13decfb05eb266770f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/657297 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
12 dayshash/maphash: add Hasher interface and ComparableHasher implAlan Donovan
Hasher is the standard interface for expressing custom hash functions and equivalence relations for arbitrary data types. This allows them to be used in hash-based collection types such as a hash table (CL 612217) or a Bloom filter (CL 740440). The ComparableHasher type is an implementation of the Hasher interface for comparable values that is consistent with their usual equivalence relation (==). Fixes #70471 Change-Id: Iaa42eb7017d9c4dab487ad6c842c68a81fa7d28a Reviewed-on: https://go-review.googlesource.com/c/go/+/657296 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Hongxiang Jiang <hxjiang@golang.org> Reviewed-by: Junyang Shao <shaojunyang@google.com> Auto-Submit: Alan Donovan <adonovan@google.com> TryBot-Bypass: Alan Donovan <adonovan@google.com>
2026-03-24doc/next: add release note for automatic HTTP/1 response body drainingNicholas S. Husin
For #77370 Change-Id: I8310bad4b0cf92e0e4f9fd826eab8172558a5144 Reviewed-on: https://go-review.googlesource.com/c/go/+/756160 Reviewed-by: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com>
2026-03-06net/url: add Values.CloneEmmanuel T Odeke
This change implements a method Clone on Values that creates a deep copy of all of the subject's consistent values. CL 746800 added URL.Clone and this one therefore closes out the feature. Fixes #73450 Change-Id: I6fb95091c856e43063ab641c03034e1faaff8ed6 Reviewed-on: https://go-review.googlesource.com/c/go/+/746801 Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Nicholas Husin <nsh@golang.org>
2026-02-23go/token: add File.String methodAlan Donovan
It returns a brief, unspecified, human-readable description of the File. + test, doc, relnote Fixes #76285 Change-Id: I8b0705cf20eaac095bc9dfba7f1181774544f02c Reviewed-on: https://go-review.googlesource.com/c/go/+/743280 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
2026-02-19net/url: add (*URL).CloneEmmanuel T Odeke
This change adds URL.Clone which creates a deep copy of the URL's fields including the .User and tests these. In a separate CL I shall send Values.Clone too. Updates #73450 Change-Id: Ifea4bfc4ddd0640247544ec111ec83bd9bbe9104 Reviewed-on: https://go-review.googlesource.com/c/go/+/746800 Reviewed-by: Nicholas Husin <husin@google.com> Auto-Submit: Emmanuel Odeke <emmanuel@orijtech.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Nicholas Husin <nsh@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Damien Neil <dneil@google.com>
2026-02-02testing/synctest: add SleepDamien Neil
Add a convenience function which combines time.Sleep and synctest.Wait. Fixes #77169 Change-Id: I2ff105105e95cfd8e5b4f72ccacf7afa59efb6bd Reviewed-on: https://go-review.googlesource.com/c/go/+/740066 Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-01-28go/scanner: add End method to ScannerMateusz Poliwczak
Fixes #74958 Change-Id: I50ef64ae9ae6a762a7aada3d29914bae6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/738681 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-01-22net/http: Add Server.DisableClientPriority fieldNicholas S. Husin
The DisableClientPriority field is currently still a no-op, and will only take effect once golang.org/x/net is bundled up into h2_bundle.go again. For #75500 Change-Id: I9e2135bed50b7f201aea93467e3f5f5f6c81cb1c Reviewed-on: https://go-review.googlesource.com/c/go/+/738620 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Nicholas Husin <husin@google.com>
2026-01-22all: update to Unicode 17Russ Cox
Process: - Disable unicode TestProperties. - Run UNICODE_VERSION=17.0.0 go -C ../src/golang.org/x/text generate - Run go generate strconv - Update unicode TestProperties by hand to add missing test cases. This will break x/text using the main repo until the corresponding x/text CL is submitted. It should not break anything else. For #77266. Change-Id: Ia3ffb5a81e212b991714eef70eebfca98a0c8aab Reviewed-on: https://go-review.googlesource.com/c/go/+/737420 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> TryBot-Bypass: Russ Cox <rsc@golang.org>
2026-01-21doc/next: initializeCarlos Amedee
Initialize the doc/next directory for the next release by copying the contents of doc/initial into it. For #76474. Change-Id: I52c826cf42aa93f1dea8bf8f7f386a77265bf31a Reviewed-on: https://go-review.googlesource.com/c/go/+/737961 Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Carlos Amedee <carlos@golang.org> TryBot-Bypass: Carlos Amedee <carlos@golang.org>
2025-12-03doc/next: deleteGopher Robot
The release note fragments have been merged and added as _content/doc/go1.26.md in x/website in CL 726360. For #75005. Change-Id: I13533b8a6aac470afe066ddf420028c0360a5bb1 Reviewed-on: https://go-review.googlesource.com/c/go/+/726341 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com>
2025-12-03doc/next/6-stdlib/99-minor/go/ast/76031.md: add BasicLit caveatAlan Donovan
For #76395 Change-Id: Ied054b54f319a2a448ccdfa4b42044250abb5af7 Reviewed-on: https://go-review.googlesource.com/c/go/+/722820 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2025-12-02doc: pre-announce removal of gotypesalias and asynctimerchan GODEBUG flagsRobert Griesemer
This announcement follows the policy outlined in #76163. For #76472. Change-Id: I4299e7f474e314810883dc4f50be6afba8c3e3e7 Reviewed-on: https://go-review.googlesource.com/c/go/+/726020 Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-12-02doc/next: release note for scheduler metricsMichael Anthony Knyszek
For #15490. Change-Id: Ic268a7d1d54814e903fc44f5f143008fb5d6dcde Reviewed-on: https://go-review.googlesource.com/c/go/+/725663 TryBot-Bypass: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com>
2025-12-01doc/next: clean up some Go 1.26 release notesBrad Fitzpatrick
The Var.Kind stuff was in Go 1.25. And the net additions were in the wrong tense and didn't have links. Change-Id: Ie710e1d41c714fe627a3a21a5afb6b7f78301f68 Reviewed-on: https://go-review.googlesource.com/c/go/+/724780 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2025-11-26crypto,testing/cryptotest: ignore random io.Reader params, add SetGlobalRandomFilippo Valsorda
First, we centralize all random bytes generation through drbg.Read. The rest of the FIPS 140-3 module can't use external functions anyway, so drbg.Read needs to have all the logic. Then, make sure that the crypto/... tree uses drbg.Read (or the new crypto/internal/rand.Reader wrapper) instead of crypto/rand, so it is unaffected by applications setting crypto/rand.Reader. Next, pass all unspecified random io.Reader parameters through the new crypto/internal/rand.CustomReader, which just redirects to drbg.Read unless GODEBUG=cryptocustomrand=1 is set. Move all the calls to MaybeReadByte there, since it's only needed for these custom Readers. Finally, add testing/cryptotest.SetGlobalRandom which sets crypto/rand.Reader to a locked deterministic source and overrides drbg.Read. This way SetGlobalRandom should affect all cryptographic randomness in the standard library. Fixes #70942 Co-authored-by: qiulaidongfeng <2645477756@qq.com> Change-Id: I6a6a69641311d9fac318abcc6d79677f0e406100 Reviewed-on: https://go-review.googlesource.com/c/go/+/724480 Reviewed-by: Nicholas Husin <nsh@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-26runtime/secret: implement new secret packageDaniel Morsing
Implement secret.Do. - When secret.Do returns: - Clear stack that is used by the argument function. - Clear all the registers that might contain secrets. - On stack growth in secret mode, clear the old stack. - When objects are allocated in secret mode, mark them and then zero the marked objects immediately when they are freed. - If the argument function panics, raise that panic as if it originated from secret.Do. This removes anything about the secret function from tracebacks. For now, this is only implemented on linux for arm64 and amd64. This is a rebased version of Keith Randalls initial implementation at CL 600635. I have added arm64 support, signal handling, preemption handling and dealt with vDSOs spilling into system stacks. Fixes #21865 Change-Id: I6fbd5a233beeaceb160785e0c0199a5c94d8e520 Co-authored-by: Keith Randall <khr@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/704615 Reviewed-by: Roland Shoemaker <roland@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-11-26crypto/tls: support crypto.MessageSigner private keysFilippo Valsorda
Fixes #75656 Change-Id: I6bc71c80973765ef995d17b1450ea2026a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/724820 Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Nicholas Husin <husin@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <nsh@golang.org>
2025-11-26crypto/fips140: add WithoutEnforcementDaniel Morsing
WithoutEnforcement lets programs running under GODEBUG=fips140=only selectively opt out of strict enforcement. This is especially helpful for non-critical uses of cryptography routines like SHA-1 for content addressable storage backends (E.g. git). Fixes #74630 Change-Id: Iabba1f5eb63498db98047aca45e09c5dccf2fbdf Reviewed-on: https://go-review.googlesource.com/c/go/+/723720 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
2025-11-26crypto/x509: add ExtKeyUsage.OID methodRoland Shoemaker
And OIDFromASN1OID for converting between asn1.ObjectIdentifier and OID. Fixes #75325 Change-Id: I3b84dce54346d88aab731ffe30d0fef07b014f04 Reviewed-on: https://go-review.googlesource.com/c/go/+/724761 Reviewed-by: Neal Patel <nealpatel@google.com> Auto-Submit: Roland Shoemaker <roland@golang.org> Commit-Queue: Neal Patel <nealpatel@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-25crypto/tls: add SecP256r1/SecP384r1MLKEM1024 hybrid post-quantum key exchangesFilippo Valsorda
Fixes #71206 Change-Id: If3cf75261c56828b87ae6805bd2913f56a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/722140 Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-25crypto/hpke: expose crypto/internal/hpkeFilippo Valsorda
Fixes #75300 Change-Id: I6a83e0d040dba3366819d2afff704f886a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/723560 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Auto-Submit: Filippo Valsorda <filippo@golang.org> TryBot-Bypass: Filippo Valsorda <filippo@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org>
2025-11-25reflect: add iterator equivalents for NumField, NumIn, NumOut and NumMethodQuentin Quaadgras
The new methods are Type.Fields, Type.Methods, Type.Ins, Type.Outs, Value.Fields and Value.Methods. These methods have been introduced into the reflect package (as well as tests) replacing three-clause for loops where possible. Fixes #66631 Change-Id: Iab346e52c0eadd7817afae96d9ef73a35db65fd2 GitHub-Last-Rev: 8768ef71b9fd74536094cb1072c7075dc732cd5c GitHub-Pull-Request: golang/go#75646 Reviewed-on: https://go-review.googlesource.com/c/go/+/707356 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
2025-11-25crypto/rsa: add EncryptOAEPWithOptionsAndrey Pshenkin
Co-authored-by: Filippo Valsorda <filippo@golang.org> Change-Id: I78968794d609a7b343e5affc141d8ba96a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/722260 Reviewed-by: Roland Shoemaker <roland@golang.org> TryBot-Bypass: Filippo Valsorda <filippo@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
2025-11-25crypto/tls: expose HelloRetryRequest stateDaniel McCarney
This commit adds fields to the ClientHelloInfo and ConnectionState structures to represent hello retry request state information. ClientHelloInfo gains a new HelloRetryRequest bool field that indicates if the client hello was sent in response to a TLS 1.3 hello retry request message previously emitted by the server. ConnectionState gains a new HelloRetryRequest bool field that indicates (depending on the connection role) whether the client received a TLS 1.3 hello retry request message from the server, or whether the server sent such a message to a client. Fixes #74425 Change-Id: Ic1a5290b8a4ba1568da1d2c2cf9f148150955fa5 Reviewed-on: https://go-review.googlesource.com/c/go/+/717440 Reviewed-by: Roland Shoemaker <roland@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Daniel McCarney <daniel@binaryparadox.net>
2025-11-24doc: pre-announce removal of 1.23 and earlier crypto GODEBUGsSean Liao
For #75316 Change-Id: Ife391b8c3e7fd2fec0e53b296d47b4756a787001 Reviewed-on: https://go-review.googlesource.com/c/go/+/723100 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-11-24crypto/fips140: add VersionSean Liao
Fixes #75301 Change-Id: If953b4382499570d5437491036f91cbe4fec7c01 Reviewed-on: https://go-review.googlesource.com/c/go/+/723101 Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-11-24net/http: add Transport.NewClientConnDamien Neil
For #75772 Change-Id: Iad7607b40636bab1faf8653455e92e9700309003 Reviewed-on: https://go-review.googlesource.com/c/go/+/722223 Reviewed-by: Nicholas Husin <nsh@golang.org> Reviewed-by: Nicholas Husin <husin@google.com> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-24crypto/x509: add ExtKeyUsage.String and KeyUsage.String methodsFilippo Valsorda
Fixes #56866 Change-Id: Icc8f067820f5d74e0d5073bce160429e6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/723360 Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Roland Shoemaker <roland@golang.org>
2025-11-20crypto/tls: add QUICErrorEventDamien Neil
Add a new QUICEvent type for reporting errors. This provides a way to report errors that don't occur as a result of QUICConn.Start, QUICConn.HandleData, or QUICConn.SendSessionTicket. Fixes #75108 Change-Id: I941371a21f26b940e75287a66d7e0211fc0baab1 Reviewed-on: https://go-review.googlesource.com/c/go/+/719040 Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
2025-11-20os/signal: make NotifyContext cancel the context with a causeFilippo Valsorda
This is especially useful when combined with the nesting semantics of context.Cause, and with errgroup's use of CancelCauseFunc. For example, with the following code ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) defer stop() serveGroup, ctx := errgroup.WithContext(ctx) calling context.Cause(ctx) after serveGroup.Wait() will return either "interrupt signal received" (if that happens first) or the error from serveGroup. Change-Id: Ie181f5f84269f6e39defdad2d5fd8ead6a6a6964 Reviewed-on: https://go-review.googlesource.com/c/go/+/721700 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Commit-Queue: Junyang Shao <shaojunyang@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
2025-11-19crypto: add Encapsulator and Decapsulator interfacesFilippo Valsorda
Updates #75300 Change-Id: I6a6a6964a0ab36ee3132d8481515c34c86011c13 Reviewed-on: https://go-review.googlesource.com/c/go/+/705796 Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-19crypto/ecdh: add KeyExchanger interfaceFilippo Valsorda
Updates #75300 Change-Id: I6a6a6964bbfa1f099c74d0a3fb3f7894d7b1b832 Reviewed-on: https://go-review.googlesource.com/c/go/+/705795 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
2025-11-17debug/elf: sync new loong64 relocation types up to LoongArch ELF psABI v20250521WANG Xuerui
Add several new relocation types defined in newer versions of LoongArch ELF psABI v20250521, part of the v2.40 spec bundle. The new relocations are seeing increased adoption because distributions are moving to newer GNU/LLVM toolchain versions, so Go's internal linker must be prepared to handle some of them, especially R_LARCH_CALL36 because the ecosystem is slowly migrating to the "medium" code model by default. The constants R_LARCH_DELETE and R_LARCH_CFA were removed in LoongArch ELF psABI v20231102 (spec bundle v2.20), but they are already part of the public API, so they are retained for now for upholding the go1 compatibility guarantee. Corresponding binutils implementation: * R_LARCH_CALL36: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=dc5f359ed6a36d2c895d89c3e4886f3a2b6d9232 * TLSDESC: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=26265e7fdf19d461563388495b6799eb3719f80a * TLS {LD,GD,DESC} relaxation: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae296cc45258b95223210263d1b91115e84beb56 * TLS LE relaxation: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=775dead218e12e3fb94481c7a99aa0238d6a9138 Updates #75562 See: https://github.com/loongson/la-abi-specs/blob/v2.40/laelf.adoc See: https://github.com/loongson-community/discussions/issues/43 Change-Id: Ib023e0b6becc0862d27afc419d3eb84c737359db Reviewed-on: https://go-review.googlesource.com/c/go/+/709716 Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: abner chenc <chenguoqi@loongson.cn> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
2025-11-17go/ast: fix BasicLit.End position for raw strings containing \rAlan Donovan
This CL causes the parser to record in a new field, BasicLit.EndPos, the actual end position of each literal token, and to use it in BasicLit.End. Previously, the End was computed heuristically as Pos + len(Value). This heuristic is incorrect for a multiline raw string literal on Windows, since the scanner normalizes \r\n to \n. Unfortunately the actual end position is not returned by the Scanner.Scan method, so the scanner and parser conspire using a global variable in the go/internal/scannerhook package to communicate. + test, api change, relnote Fixes #76031 Change-Id: I57c18a44e85f7403d470ba23d41dcdcc5a9432c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/720060 Reviewed-by: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-17crypto/mlkem/mlkemtest: add derandomized Encapsulate768/1024Filippo Valsorda
Fixes #73627 Change-Id: I6a6a69649927e9b1cdff910832084fdc04ff5bc2 Reviewed-on: https://go-review.googlesource.com/c/go/+/703795 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
2025-11-17go/token: add (*File).End methodAlan Donovan
Also, use it in a number of places. + test, api, relnote Fixes #75849 Change-Id: I44acf5b8190b964fd3975009aa407d7c82cee19b Reviewed-on: https://go-review.googlesource.com/c/go/+/720061 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
2025-11-15crypto/rsa: deprecate PKCS#1 v1.5 encryptionFilippo Valsorda
Fixes #75302 Change-Id: I6a6a6964c2b3b33bfb34b9677a57610b933bbfab Reviewed-on: https://go-review.googlesource.com/c/go/+/701436 Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-11-12net/url: disallow raw IPv6 addresses in hostSean Liao
RFC 3986 requires square brackets around IPv6 addresses. Parse's acceptance of raw IPv6 addresses is non compliant, and complicates splitting out a port. This is a resubmission of CL 710176 after the revert in CL 711800, this time with a new urlstrictipv6 godebug to control the behavior. Fixes #31024 Fixes #75223 Change-Id: I4cbe5bb84266b3efe9c98cf4300421ddf1df7291 Reviewed-on: https://go-review.googlesource.com/c/go/+/712840 Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-03bytes: add Buffer.PeekIlia Choly
Fixes #73794 Change-Id: I0a57db05aacfa805213fe8278fc727e76eb8a65e GitHub-Last-Rev: 3494d93f803f21905dfd5a9d593644da69279f16 GitHub-Pull-Request: golang/go#73795 Reviewed-on: https://go-review.googlesource.com/c/go/+/674415 Reviewed-by: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-10-21go/ast: add ParseDirective for parsing directive commentsAustin Clements
This adds an ast.Directive API for parsing directive comments such as "//go:build" and "//go:embed". This will help tools standardize the syntax of these directive comments. Even within the standard Go tools there's little agreement on the finer details of the syntax of directives today. Fixes #68021. Change-Id: I84a988a667682c9ac70632df6e925461ac95e381 Reviewed-on: https://go-review.googlesource.com/c/go/+/704835 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com> Reviewed-by: Alan Donovan <adonovan@google.com>
2025-10-07cmd/go, testing: add TB.ArtifactDir and -artifacts flagDamien Neil
Add TB.ArtifactDir, which returns a directory for a test to store output files in. Add a -artifacts testflag which enables persistent storage of artifacts in the output directory (-outputdir, or the current directory by default). Fixes #71287 Change-Id: I5f6515a6cd6c103f88588f4c033d5ea11ffd0c3c Reviewed-on: https://go-review.googlesource.com/c/go/+/696399 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com>
2025-10-02net/http/httputil: deprecate ReverseProxy.DirectorDamien Neil
The Director function has been superseded by Rewrite. Rewrite avoids fundamental security issues with hop-by-hop header handling in the Director API and has better default handling of X-Forwarded-* headers. Fixes #73161 Change-Id: Iadaf3070e0082458f79fb892ade51cb7ce832802 Reviewed-on: https://go-review.googlesource.com/c/go/+/708615 Reviewed-by: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <nsh@golang.org>
2025-09-30errors: add AsTypeJulien Cretel
Fixes #51945 Change-Id: Icda169782e796578eba728938134a85b5827d3b6 GitHub-Last-Rev: c6ff335ee1ffb6b7975141795a4632a55247299d GitHub-Pull-Request: golang/go#75621 Reviewed-on: https://go-review.googlesource.com/c/go/+/707235 Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sean Liao <sean@liao.dev>
2025-09-26net/http: add HTTP2Config.StrictMaxConcurrentRequestsDamien Neil
Add a field to HTTP2Config controlling how we behave when an HTTP/2 connection reaches its concurrency limit. This field will have no effect until golang.org/x/net/http2 is updated to make use of it, and h2_bundle.go is updated with the new http2 package. For #67813 Change-Id: Ic72a0986528abb21649f28e9fe7cf6e1236b388d Reviewed-on: https://go-review.googlesource.com/c/go/+/615875 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Nicholas Husin <nsh@golang.org> Reviewed-by: Nicholas Husin <husin@google.com>
2025-09-25doc/next: document new image/jpeg DCT in release notesRuss Cox
Fixes #75603. Change-Id: I0b4b93af467b97c2d4b5703e31605ff4f7970260 Reviewed-on: https://go-review.googlesource.com/c/go/+/706736 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Russ Cox <rsc@golang.org>
2025-09-15os: add (*Process).WithHandleKir Kolyshkin
Implement (*Process).WithHandle, add tests for all platforms. Fixes #70352 Change-Id: I7a8012fb4e1e1b4ce1e75a59403ff6e77504fc56 Reviewed-on: https://go-review.googlesource.com/c/go/+/699615 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Mark Freeman <markfreeman@google.com> Auto-Submit: Kirill Kolyshkin <kolyshkin@gmail.com> Reviewed-by: Michael Pratt <mpratt@google.com>