Nicholas S. Husin
c861da326e
doc/next: add release note for automatic HTTP/1 response body draining
...
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-24 06:29:25 -07:00
Basavaraj PB
f26befb380
net: avoid wrapping io.EOF in UnixConn read methods
...
The io.Reader contract requires that Read methods return io.EOF
directly instead of wrapping it in another error.
Currently UnixConn.ReadFromUnix, ReadFrom, and ReadMsgUnix wrap
io.EOF inside net.OpError, causing callers checking for io.EOF
to fail.
Fix by avoiding wrapping when err == io.EOF.
Fixes #78137
Change-Id: Ibb4e67cfb4c727c668ad79d1fb9e205f9b7e1903
Reviewed-on: https://go-review.googlesource.com/c/go/+/754960
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: Nicholas Husin <nsh@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Basavaraj P <basavarajbankolli76@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@golang.org >
Auto-Submit: Nicholas Husin <nsh@golang.org >
2026-03-23 13:47:18 -07:00
Michael Podtserkovskii
4b7b1be731
cmd/internal/objabi: implement GCC-compatible response file parsing
...
Replace line-based response file parsing with GCC-compatible one
that supports:
- Whitespace-delimited arguments (multiple args per line)
- Single quotes for literal content (no escape processing)
- Double quotes with escape sequences: \\, \", \$, \`
- Backslash-newline line continuation (both LF and CRLF)
Update encodeArg in cmd/go/internal/work to produce GCC-compatible
output with proper escaping of special characters.
Add response file support to cmd/pack.
For #77177
Change-Id: Ib8dbe2761ebe139b3949dcaeb1de4bb5b15ddabb
Reviewed-on: https://go-review.googlesource.com/c/go/+/737500
Reviewed-by: Carlos Amedee <carlos@golang.org >
Reviewed-by: Mark Freeman <markfreeman@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Matloob <matloob@golang.org >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
2026-03-18 19:58:52 -07:00
Sean Liao
34ff24cb4b
doc/next: add release notes for enabling stdversion in tests
...
For CL 755240
For #77729
Change-Id: I8e3cd744bce0e7807fb403f0b391a1442a79adcc
Reviewed-on: https://go-review.googlesource.com/c/go/+/756040
Reviewed-by: Alan Donovan <adonovan@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2026-03-17 09:55:33 -07:00
David Finkel
3694f33692
runtime: GODEBUG=tracebacklabels=1 for 1.27+
...
https://go.dev/cl/742580 updated the goroutine label format in
tracebacks to only quote the values under some circumstances, and use a
more broadly acceptable format. Flip the GODEBUG=tracebacklabels default
for go 1.27+ modules.
Notably, tracebacklabels is marked as Opaque to avoid some diciness in
maintaining a usage metric in signal handlers, etc. (where mutex
acquisition may be problematic)
Also, update the go 1.27 release notes to call out the new feature.
Updates #76349
Change-Id: Iedd3f6b17d83e99da20365b952a565022d20ff13
Reviewed-on: https://go-review.googlesource.com/c/go/+/751580
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Alan Donovan <adonovan@google.com >
Reviewed-by: Alan Donovan <adonovan@google.com >
Reviewed-by: Mark Freeman <markfreeman@google.com >
2026-03-10 20:06:24 -07:00
Emmanuel T Odeke
0359353574
net/url: add Values.Clone
...
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-03-06 10:48:32 -08:00
Alan Donovan
4e693d1ec5
go/token: add File.String method
...
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-23 07:48:58 -08:00
Emmanuel T Odeke
09c3cfbc20
net/url: add (*URL).Clone
...
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-19 15:40:16 -08:00
Damien Neil
8ac41b52c4
testing/synctest: add Sleep
...
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-02-02 14:43:36 -08:00
Mateusz Poliwczak
3c924059e6
go/scanner: add End method to Scanner
...
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-28 22:44:07 -08:00
Dmitri Shuralyov
bb221e8954
doc/go1.27: document macOS requirements
...
For #75836 .
Change-Id: I07f607178fadbfec95459b2a446f58ae3c5e8932
Reviewed-on: https://go-review.googlesource.com/c/go/+/739380
Reviewed-by: Carlos Amedee <carlos@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2026-01-26 13:07:04 -08:00
Nicholas S. Husin
e0c4ad77cf
net/http: Add Server.DisableClientPriority field
...
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-22 14:02:25 -08:00
Russ Cox
dd39dfb534
all: update to Unicode 17
...
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-22 13:16:03 -08:00
Carlos Amedee
455282911a
doc/next: initialize
...
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 >
2026-01-21 12:27:12 -08:00
Gopher Robot
5945fc02fc
doc/next: delete
...
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-03 09:37:54 -08:00
Will Faught
2729e87aa5
doc/next: pluralize 'result'
...
Change-Id: Id53ee875ee31b43a6d7bd3f180260276ddd4f8b9
GitHub-Last-Rev: c90e386967
GitHub-Pull-Request: golang/go#76664
Reviewed-on: https://go-review.googlesource.com/c/go/+/725922
Reviewed-by: Mark Freeman <markfreeman@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
2025-12-03 08:04:02 -08:00
Alan Donovan
6e72f526cd
doc/next/6-stdlib/99-minor/go/ast/76031.md: add BasicLit caveat
...
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-03 07:26:36 -08:00
Robert Griesemer
7cab1b1b26
doc: pre-announce removal of gotypesalias and asynctimerchan GODEBUG flags
...
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-02 16:18:09 -08:00
Michael Anthony Knyszek
2e06fa6b68
doc/next: release note for scheduler metrics
...
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-02 14:44:07 -08:00
Michael Anthony Knyszek
77c795011b
doc/next: document cgo call overhead improvement
...
Change-Id: Ibac18513d2f76172665b4f3a4ea09b69ae0bdef3
Reviewed-on: https://go-review.googlesource.com/c/go/+/725664
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Auto-Submit: Michael Knyszek <mknyszek@google.com >
2025-12-02 14:43:44 -08:00
Keith Randall
6e4abe8cef
doc: mention stack allocation of slices
...
Very similar to last release's note.
Change-Id: Ie7afe21d98cee1c9718e53b20e8af8ee18504bb9
Reviewed-on: https://go-review.googlesource.com/c/go/+/725921
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Keith Randall <khr@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Auto-Submit: Keith Randall <khr@golang.org >
2025-12-02 14:43:05 -08:00
Michael Anthony Knyszek
88c24de8b5
doc/next: add section for Green Tea
...
Change-Id: I420e8d673e5d34d1b09c02b8bc84b890da42e320
Reviewed-on: https://go-review.googlesource.com/c/go/+/725662
Reviewed-by: Michael Pratt <mpratt@google.com >
Auto-Submit: Michael Knyszek <mknyszek@google.com >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
2025-12-02 13:55:43 -08:00
Michael Pratt
ac3e0ae51a
doc: document go tool pprof -http default change
...
For #74774 .
Change-Id: I6a6a636c579fa95938021cc73d7d11a86f8a19a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/725540
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-01 11:56:35 -08:00
Brad Fitzpatrick
18015e8c36
doc/next: clean up some Go 1.26 release notes
...
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-12-01 09:41:45 -08:00
Filippo Valsorda
2b8dbb35b0
crypto,testing/cryptotest: ignore random io.Reader params, add SetGlobalRandom
...
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-26 16:01:17 -08:00
Daniel Morsing
a3fb92a710
runtime/secret: implement new secret package
...
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-26 15:42:52 -08:00
Filippo Valsorda
992ad55e3d
crypto/tls: support crypto.MessageSigner private keys
...
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-26 15:17:42 -08:00
Dmitri Shuralyov
301d9f9b52
doc/next: document broken freebsd/riscv64 port
...
Also update comment in cmd/dist's broken map to point to the top-level
umbrella issue.
For #76475 .
For #75005 .
Change-Id: I43b8384af4264dc5d72ceea8d05730b9db81123a
Reviewed-on: https://go-review.googlesource.com/c/go/+/724860
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org >
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org >
2025-11-26 14:43:11 -08:00
Daniel Morsing
86bbea0cfa
crypto/fips140: add WithoutEnforcement
...
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-26 14:26:06 -08:00
Roland Shoemaker
e2cae9ecdf
crypto/x509: add ExtKeyUsage.OID method
...
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-26 14:21:13 -08:00
Filippo Valsorda
1768cb40b8
crypto/tls: add SecP256r1/SecP384r1MLKEM1024 hybrid post-quantum key exchanges
...
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-25 17:25:00 -08:00
Filippo Valsorda
e3088d6eb8
crypto/hpke: expose crypto/internal/hpke
...
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-25 10:35:07 -08:00
Quentin Quaadgras
e8fdfeb72b
reflect: add iterator equivalents for NumField, NumIn, NumOut and NumMethod
...
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: 8768ef71b9
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-25 09:18:42 -08:00
Andrey Pshenkin
0d2baa808c
crypto/rsa: add EncryptOAEPWithOptions
...
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-25 08:22:22 -08:00
Daniel McCarney
4fb7e083a8
crypto/tls: expose HelloRetryRequest state
...
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-25 07:40:46 -08:00
Sean Liao
31d373534e
doc: pre-announce removal of 1.23 and earlier crypto GODEBUGs
...
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-24 23:09:37 -08:00
Sean Liao
aa093eed83
crypto/fips140: add Version
...
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-24 23:09:27 -08:00
Damien Neil
0921e1db83
net/http: add Transport.NewClientConn
...
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-24 17:26:36 -08:00
Filippo Valsorda
c6f882f6c5
crypto/x509: add ExtKeyUsage.String and KeyUsage.String methods
...
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-24 16:19:47 -08:00
Sean Liao
1993dca400
doc/next: pre-announce end of support for macOS 12 in Go 1.27
...
For #75836
Change-Id: I7fd515eb7fcdfb5944388ab42716fd81bc13a7b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/723080
Reviewed-by: Cherry Mui <cherryyz@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2025-11-23 03:30:55 -08:00
Damien Neil
bd2b117c2c
crypto/tls: add QUICErrorEvent
...
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-20 15:39:14 -08:00
Filippo Valsorda
c1b7112af8
os/signal: make NotifyContext cancel the context with a cause
...
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-20 13:01:32 -08:00
Filippo Valsorda
a2946f2385
crypto: add Encapsulator and Decapsulator interfaces
...
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-19 14:14:13 -08:00
Filippo Valsorda
6b83bd7146
crypto/ecdh: add KeyExchanger interface
...
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-19 14:14:05 -08:00
WANG Xuerui
a087dea869
debug/elf: sync new loong64 relocation types up to LoongArch ELF psABI v20250521
...
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-17 17:00:42 -08:00
Alan Donovan
8e734ec954
go/ast: fix BasicLit.End position for raw strings containing \r
...
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-17 10:52:48 -08:00
Filippo Valsorda
590cf18daf
crypto/mlkem/mlkemtest: add derandomized Encapsulate768/1024
...
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-17 09:54:06 -08:00
Alan Donovan
1297fae708
go/token: add (*File).End method
...
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-17 09:47:47 -08:00
Filippo Valsorda
c58d075e9a
crypto/rsa: deprecate PKCS#1 v1.5 encryption
...
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-15 15:41:23 -08:00
Sean Liao
0c28789bd7
net/url: disallow raw IPv6 addresses in host
...
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-12 10:02:50 -08:00