Historically, x/net/http2 has supported working with user-provided
net.Conns that implement the ConnectionState method from *tls.Conn.
Howver, net/http has required that user-provided net.Conns be a
concrete *tls.Conn for it to observe the TLS state of the connection.
CL 440795 made the net/http Server set Request.TLS when the net.Conn
has a ConnectionState method, but did not affect protocol negotiation.
(So a non-*tls.Conn can never negotiate HTTP/2.)
CL 765360 made the net/http Server also able to negotiate HTTP/2
when using a non-*tls.Conn net.Conn with a ConnectionState method.
This was part of a change to support net/http/internal/http2 tests,
not an intentional change to functionality in net/http.
Finish off the job by making the net/http Transport negotiate HTTP/2
when using a non-*tls.Conn net.Conn with a ConnectionState method.
Document the new support.
Fixes#21753
Change-Id: Ia9854f90df3044fcc855fce105006a186a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/772961
Reviewed-by: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: 王伟强 <wwqgtxx@gmail.com>
TryBot-Bypass: Damien Neil <dneil@google.com>
RFC 2253 §2.4 says that an AttributeValue should be rendered as a string
when its ASN.1 type has a string representation, reserving the
prefixed hex form for types that don't.
RDNSequence.String previously hex-encoded any value whose OID wasn't in
attributeTypeNames, even when the value was already a Go string. Render
string-typed values directly; the existing escape logic handles RFC 2253
special characters.
Fixes#33093
Change-Id: Idb8acd907f9dac902790c9ac7d0bc0cb36b5b918
Reviewed-on: https://go-review.googlesource.com/c/go/+/773800
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Today `-http=:6060` listens on all addresses. Strictly speaking, that is
what `:6060` implies, but most users actually only care to access from
their own machine.
cmd/pprof listens only on localhost when given such an address.
Change cmd/trace to match this behavior since it is a safer default and
makes cmd/trace more consistent with our other tools.
Users that actually want to listen on all addresses can explicitly
include the unspecified address (e.g., `-http=0.0.0.0:6060`).
For #78921.
Change-Id: I47e1fbbdd5374abfeeec10916eb9d2136a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/770461
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Make the rule for range expressions of type parameter type more
visible by moving it up (it was easily missed before as it was
at the end of the example section).
Add a corresponding example to the examples.
Per suggestion from @adonovan.
Change-Id: I8527e69ecc7d0110554ba00f4c30829f7d260d41
Reviewed-on: https://go-review.googlesource.com/c/go/+/764921
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
For #77273.
Change-Id: Idf5b81f77115e4e30921476f7424769fdf604ef4
Reviewed-on: https://go-review.googlesource.com/c/go/+/764920
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
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>
For #77273.
Change-Id: I600cfd6209cf77d07c18a94ac1126da1c0ba9fab
Reviewed-on: https://go-review.googlesource.com/c/go/+/759880
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
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>
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>
Be explicit about it.
For #78483.
For #78314.
Change-Id: I9dc65d72ec7840a73c21869a8ca26dfeed17ad61
Reviewed-on: https://go-review.googlesource.com/c/go/+/761701
Reviewed-by: Jakub Ciolek <jakub@ciolek.dev>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Use "declared" rather than "defined" where referring to a declaration
(rather than a type definition) is more appropriate.
Change-Id: I691b55e05fcdce489e45286c7a88cbd992e80e57
Reviewed-on: https://go-review.googlesource.com/c/go/+/757121
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
We want the predeclared types (excluding any) to have unique identity.
Originally (Go 1.0), the only types with unique identity were named
types (and they happened to have names).
When we introduced alias declarations, we changed the terminology and
called named types (old) defined types (new). With this change, the
predeclared types became defined types.
When we introduced type parameters, we re-introduced the notion of a
named type as the (new-again) umbrella term for types with a unique
identity. But we didn't adjust the spec for predeclared types - we
kept calling them defined types.
Fix this by completing the terminology transition.
Also, clarify that the predeclared type `any` is not a named type.
Fixes#78208.
Change-Id: I13c2b8faa35e2b51958097872b1529c2aaf42c4e
Reviewed-on: https://go-review.googlesource.com/c/go/+/757120
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
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>
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>
For #76349.
Change-Id: I27dd7658e6cbcf6afd1287a7ec5a39c576ceee67
Reviewed-on: https://go-review.googlesource.com/c/go/+/756580
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: David Finkel <david.finkel@gmail.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
This file used to be implicitly a template prior to CL 733500, but now
it's no longer a template. The only template use here can be trivially
expressed with pure Markdown syntax, so do that. (The alternative path
would be to set 'template: true' explicitly.)
Fixes#78211.
Change-Id: I66970f0d081b4e80e8d330330ad17a5702364391
Reviewed-on: https://go-review.googlesource.com/c/go/+/756560
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
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>
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>
Use "promoted" rather than "embedded" because the selector
provides access to a promoted field.
For #9859.
Change-Id: If62c5260ab7bdfef3d6ea4ff770543ad668ac9b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/755782
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
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>
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>
The meta tag can include a content attribute that contains URLs, which
we currently don't escape if they are inserted via a template action.
This can plausibly lead to XSS vulnerabilities if untrusted data is
inserted there, the http-equiv attribute is set to "refresh", and the
content attribute contains an action like `url={{.}}`.
Track whether we are inside of a meta element, if we are inside of a
content attribute, _and_ if the content attribute contains "url=". If
all of those are true, then we will apply the same URL escaping that we
use elsewhere.
Also add a new GODEBUG, htmlmetacontenturlescape, to allow disabling this
escaping for cases where this behavior is considered safe. The behavior
can be disabled by setting htmlmetacontenturlescape=0.
Fixes CVE-2026-27142
Fixes#77954
Change-Id: I9bbca263be9894688e6ef1e9a8f8d2f4304f5873
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/3360
Reviewed-by: Neal Patel <nealpatel@google.com>
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/752181
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
For #9859.
Change-Id: I4209b41c4c09126d9ad377eea6c091c8d8a9480f
Reviewed-on: https://go-review.googlesource.com/c/go/+/734321
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
The expression statements section omitted max and min from the list
of built-ins that are not permitted in statement context.
Fixes#77896
Change-Id: I1f3d4b1d2465bde156ff751a9a7b5a212509e9a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/751080
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
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>
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>
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>
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>
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>
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>
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>
net/url does not currently limit the number of query parameters parsed by
url.ParseQuery or URL.Query.
When parsing a application/x-www-form-urlencoded form,
net/http.Request.ParseForm will parse up to 10 MB of query parameters.
An input consisting of a large number of small, unique parameters can
cause excessive memory consumption.
We now limit the number of query parameters parsed to 10000 by default.
The limit can be adjusted by setting GODEBUG=urlmaxqueryparams=<n>.
Setting urlmaxqueryparams to 0 disables the limit.
Thanks to jub0bs for reporting this issue.
Fixes#77101
Fixes CVE-2025-61726
Change-Id: Iee3374c7ee2d8586dbf158536d3ade424203ff66
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/3020
Reviewed-by: Nicholas Husin <husin@google.com>
Reviewed-by: Neal Patel <nealpatel@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/736712
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
- introduce subtitles to make various sub-sections easier to find
- split rules for struct literals into two groups (literals without
and with keys)
- move section on syntax ambiguity up as it pertains to the syntax
introduced at the start
- move prose specific to map literals into its own section
No language changes.
Change-Id: If8895b869138693179ca6e4d8b1c6ebdc705eccf
Reviewed-on: https://go-review.googlesource.com/c/go/+/734322
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
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>
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>
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>
The spec states that if the argument type for close is a type parameter,
it's type set must only contain channels and they must all have the same
element type. This latter requirement (all must have the same element
type) was never enforced by the compiler, nor is it important for
correctness or required by the implementation.
This change removes this requirement also in the spec and thus
documents what was always (since 1.18) the case.
Fixes#74034.
Change-Id: If65d50bfb581b7f37999413088d3d3b1820e054a
Reviewed-on: https://go-review.googlesource.com/c/go/+/725923
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
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>