aboutsummaryrefslogtreecommitdiff
path: root/api/next
AgeCommit message (Collapse)Author
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>
2025-12-03api: promote next to go1.26Gopher Robot
Change-Id: I078af0e9aa310a94ec5038f2bfd850e4b43a497e Reviewed-on: https://go-review.googlesource.com/c/go/+/726340 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Gopher Robot <gobot@golang.org> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
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-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-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-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-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-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>
2025-09-09crypto/ecdsa: deprecate direct use of big.Int fields in keysFilippo Valsorda
Updates #63963 Change-Id: I6a6a69645e625cde1ac1c6abf698a5fd3d52b4cf Reviewed-on: https://go-review.googlesource.com/c/go/+/701516 Auto-Submit: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-09-04log/slog: add multiple handlers support for loggerJes Cok
Fixes #65954 Change-Id: Ib01c6f47126ce290108b20c07479c82ef17c427c GitHub-Last-Rev: 34a36ea4bf099b2ad30f35e639155853ff73ef46 GitHub-Pull-Request: golang/go#74840 Reviewed-on: https://go-review.googlesource.com/c/go/+/692237 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com>
2025-09-03net/netip: export Prefix.Compare, fix orderingdatabase64128
Fixes #61642 Co-authored-by: David Anderson <dave@natulte.net> Change-Id: I54795763bdc5f62da469c2ae20618c36b64396f3 Reviewed-on: https://go-review.googlesource.com/c/go/+/700355 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
2025-08-11database/sql: allow drivers to override Scan behaviorJack Christensen
Implementing RowsColumnScanner allows the driver to completely control how values are scanned. Fixes #67546 Change-Id: Id8e7c3a973479c9665e4476fe2d29e1255aee687 GitHub-Last-Rev: ed0cacaec4a4feead56b09c0d6eee86ed58fe1ee GitHub-Pull-Request: golang/go#67648 Reviewed-on: https://go-review.googlesource.com/c/go/+/588435 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-08-11net: context aware Dialer.Dial functionsMichael Fraenkel
Add context aware dial functions for TCP, UDP, IP and Unix networks. Fixes #49097 Updates #59897 Change-Id: I7523452e8e463a587a852e0555cec822d8dcb3dd Reviewed-on: https://go-review.googlesource.com/c/go/+/490975 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Sean Liao <sean@liao.dev>
2025-05-29api: promote next to go1.25Gopher Robot
Change-Id: I96dd383ea0bf0b69d2d9058334b4bbcfbe50c77c Reviewed-on: https://go-review.googlesource.com/c/go/+/676895 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-05-27go/ast: deprecate FilterPackage, PackageExports, MergePackageFilesAlan Donovan
(More symbols that belong to the ast.Object deprecation.) Fixes #73088 Fixes #7124 Updates #52463 Updates #71122 Change-Id: I10e3ef35b587da2f3f0a65e9154e33bd53e7a093 Reviewed-on: https://go-review.googlesource.com/c/go/+/674176 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Griesemer <gri@google.com>
2025-05-23doc/next: add crudely processed todosDavid Chase
This is the output of relnote -goroot=... todo, with each todo in a comment, followed by summary text from the issue and perhaps the CL, lightly processed into markdown. For #71661. Change-Id: I855c4c4ee02491b5b6113822baf69dbafb4e54ab Reviewed-on: https://go-review.googlesource.com/c/go/+/675877 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-05-21runtime/trace: add the flight recorderCarlos Amedee
This change adds the flight recorder to the trace package. Flight recording is a technique in which trace data is kept in a circular buffer and can be flushed upon request. The implementation will be added in follow-up CLs. The flight recorder has already been implemented inside of the golang.org/x/exp/trace package. This copies the current implementation and modifies it to work within the runtime/trace package. The changes include: This adds the ability for multiple consumers (both the execution tracer and the flight recorder) to subscribe to tracing events. This change allows us to add multiple consumers without making major modifications to the runtime. Future optimizations are planned for this functionality. This removes the use of byte readers from the process that parses and processes the trace batches. This modifies the flight recorder to not parse out the trace clock frequency, since that requires knowledge of the format that's unfortunate to encode in yet another place. Right now, the trace clock frequency is considered stable for the lifetime of the program, so just grab it directly from the runtime. This change adds an in-band end-of-generation signal to the internal implementation of runtime.ReadTrace. The internal implementation is exported via linkname to runtime/trace, so the flight recorder can identify exactly when a generation has ended. This signal is also useful for ensuring that subscribers to runtime trace data always see complete generations, by starting or stopping data streaming only at generation boundaries. For #63185 Change-Id: I5c15345981a6bbe9764a3d623448237e983c64ec Reviewed-on: https://go-review.googlesource.com/c/go/+/673116 Auto-Submit: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-05-21crypto,hash: add and implement hash.ClonerFilippo Valsorda
Fixes #69521 Co-authored-by: qiulaidongfeng <2645477756@qq.com> Change-Id: I6a6a465652f5ab7e6c9054e826e17df2b8b34e41 Reviewed-on: https://go-review.googlesource.com/c/go/+/675197 Reviewed-by: Roland Shoemaker <roland@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-05-21testing: add AttrDamien Neil
Add a new Attr method to testing.TB that emits a test attribute. An attribute is an arbitrary key/value pair. Fixes #43936 Change-Id: I7ef299efae41f2cf39f2dc61ad4cdd4c3975cdb6 Reviewed-on: https://go-review.googlesource.com/c/go/+/662437 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Damien Neil <dneil@google.com>
2025-05-21hash: add XOF interfaceqiulaidongfeng
For #69518 Change-Id: I68c7057c776522514eed37cf4dc0cfddec034d3a Reviewed-on: https://go-review.googlesource.com/c/go/+/644235 Reviewed-by: Austin Clements <austin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Filippo Valsorda <filippo@golang.org>
2025-05-21crypto/ecdsa: add low-level encoding functions for keysFilippo Valsorda
Fixes #63963 Change-Id: I6a6a4656a729b6211171aca46bdc13fed5fc5643 Reviewed-on: https://go-review.googlesource.com/c/go/+/674475 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
2025-05-21net/http: add CrossOriginProtectionFilippo Valsorda
Fixes #73626 Change-Id: I6a6a4656862e7a38acb65c4815fb7a1e04896172 Reviewed-on: https://go-review.googlesource.com/c/go/+/674936 Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-05-21crypto/tls: add GetEncryptedClientHelloKeysRoland Shoemaker
This allows servers to rotate their ECH keys without needing to restart the server. Fixes #71920 Change-Id: I55591ab3303d5fde639038541c50edcf1fafc9aa Reviewed-on: https://go-review.googlesource.com/c/go/+/670655 TryBot-Bypass: Roland Shoemaker <roland@golang.org> Reviewed-by: David Chase <drchase@google.com> Auto-Submit: Roland Shoemaker <roland@golang.org> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
2025-05-21os: add Root.ReadFile and Root.WriteFileDamien Neil
For #73126 Change-Id: Ie69cc274e7b59f958c239520318b89ff0141e26b Reviewed-on: https://go-review.googlesource.com/c/go/+/674315 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Damien Neil <dneil@google.com>
2025-05-21log/slog: add GroupAttrsSean Liao
GroupAttrs is a more efficient version of Group that takes a slice of Attr values. Fixes #66365 Change-Id: Ic3046704825e17098f2fea5751f2959dce1073e2 Reviewed-on: https://go-review.googlesource.com/c/go/+/672915 Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-05-21runtime: use cgroup CPU limit to set GOMAXPROCSMichael Pratt
This CL adds two related features enabled by default via compatibility GODEBUGs containermaxprocs and updatemaxprocs. On Linux, containermaxprocs makes the Go runtime consider cgroup CPU bandwidth limits (quota/period) when setting GOMAXPROCS. If the cgroup limit is lower than the number of logical CPUs available, then the cgroup limit takes precedence. On all OSes, updatemaxprocs makes the Go runtime periodically recalculate the default GOMAXPROCS value and update GOMAXPROCS if it has changed. If GOMAXPROCS is set manually, this update does not occur. This is intended primarily to detect changes to cgroup limits, but it applies on all OSes because the CPU affinity mask can change as well. The runtime only considers the limit in the leaf cgroup (the one that actually contains the process), caching the CPU limit file descriptor(s), which are periodically reread for updates. This is a small departure from the original proposed design. It will not consider limits of parent cgroups (which may be lower than the leaf), and it will not detection cgroup migration after process start. We can consider changing this in the future, but the simpler approach is less invasive; less risk to packages that have some awareness of runtime internals. e.g., if the runtime periodically opens new files during execution, file descriptor leak detection is difficult to implement in a stable way. For #73193. Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest Change-Id: I6a6a636c631c1ae577fb8254960377ba91c5dc98 Reviewed-on: https://go-review.googlesource.com/c/go/+/670497 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
2025-05-21os: add Root.MkdirAllDamien Neil
For #67002 Change-Id: Idd74b5b59e787e89bdfad82171b6a7719465f501 Reviewed-on: https://go-review.googlesource.com/c/go/+/674116 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>