Commit graph

4086 commits

Author SHA1 Message Date
Russ Cox aa51c40b1c runtime: replace panic(nil) with panic(new(runtime.PanicNilError))
Long ago we decided that panic(nil) was too unlikely to bother
making a special case for purposes of recover. Unfortunately,
it has turned out not to be a special case. There are many examples
of code in the Go ecosystem where an author has written panic(nil)
because they want to panic and don't care about the panic value.

Using panic(nil) in this case has the unfortunate behavior of
making recover behave as though the goroutine isn't panicking.
As a result, code like:

	func f() {
		defer func() {
			if err := recover(); err != nil {
				log.Fatalf("panicked! %v", err)
			}
		}()
		call1()
		call2()
	}

looks like it guarantees that call2 has been run any time f returns,
but that turns out not to be strictly true. If call1 does panic(nil),
then f returns "successfully", having recovered the panic, but
without calling call2.

Instead you have to write something like:

	func f() {
		done := false
		defer func() {
			if err := recover(); !done {
				log.Fatalf("panicked! %v", err)
			}
		}()
		call1()
		call2()
		done = true
	}

which defeats nearly the whole point of recover. No one does this,
with the result that almost all uses of recover are subtly broken.

One specific broken use along these lines is in net/http, which
recovers from panics in handlers and sends back an HTTP error.
Users discovered in the early days of Go that panic(nil) was a
convenient way to jump out of a handler up to the serving loop
without sending back an HTTP error. This was a bug, not a feature.
Go 1.8 added panic(http.ErrAbortHandler) as a better way to access the feature.
Any lingering code that uses panic(nil) to abort an HTTP handler
without a failure message should be changed to use http.ErrAbortHandler.

Programs that need the old, unintended behavior from net/http
or other packages can set GODEBUG=panicnil=1 to stop the run-time error.

Uses of recover that want to detect panic(nil) in new programs
can check for recover returning a value of type *runtime.PanicNilError.

Because the new GODEBUG is used inside the runtime, we can't
import internal/godebug, so there is some new machinery to
cross-connect those in this CL, to allow a mutable GODEBUG setting.
That won't be necessary if we add any other mutable GODEBUG settings
in the future. The CL also corrects the handling of defaulted GODEBUG
values in the runtime, for #56986.

Fixes #25448.

Change-Id: I2b39c7e83e4f7aa308777dabf2edae54773e03f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/461956
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
2023-01-19 22:21:50 +00:00
Joe Tsai 9894ded194 time: revert strict parsing of RFC 3339
CL 444277 fixed Time.UnmarshalText and Time.UnmarshalJSON to properly
unmarshal timestamps according to RFC 3339 instead of according
to Go's bespoke time syntax that is a superset of RFC 3339.

However, this change seems to have broken an AWS S3 unit test
that relies on parsing timestamps with single digit hours.
It is unclear whether S3 emits these timestamps in production or
whether this is simply a testing artifact that has been cargo culted
across many code bases. Either way, disable strict parsing for now
and re-enable later with better GODEBUG support.

Updates #54580

Change-Id: Icced2c7f9a6b2fc06bbd9c7e90f90edce24c2306
Reviewed-on: https://go-review.googlesource.com/c/go/+/462286
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2023-01-18 19:59:26 +00:00
Filippo Valsorda d74c31f0ba doc/go1.20: update cryptography release notes
Change-Id: I5d6d2bd5cbb246ea514e5adbe936fb31b92904af
Reviewed-on: https://go-review.googlesource.com/c/go/+/459978
Run-TryBot: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
2023-01-17 18:01:38 +00:00
Russ Cox 66689c7d46 doc/go1.20: remove mention of arena goexperiment
The arena goexperiment contains code used inside Google in very
limited use cases that we will maintain, but the discussion on #51317
identified serious problems with the very idea of adding arenas to the
standard library. In particular the concept tends to infect many other
APIs in the name of efficiency, a bit like sync.Pool except more
publicly visible.

It is unclear when, if ever, we will pick up the idea and try to push
it forward into a public API, but it's not going to happen any time
soon, and we don't want users to start depending on it: it's a true
experiment and may be changed or deleted without warning.

The arena text in the release notes makes them seem more official
and supported than they really are, and we've already seen a couple
blog posts based on that erroneous belief. Delete the text to try to
set expectations better.

Change-Id: I4f6e328ac470a9cd410f5f722d0769ef62d5e5ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/462355
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Eli Bendersky <eliben@google.com>
2023-01-17 15:26:07 +00:00
Austin Clements 16cec4e7a0 doc/go1.20: mention build speed improvements
For #49569.
For #54202.

Change-Id: Iac45338bc4e45617e8ac7425076cf4cd0af157a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/461957
TryBot-Bypass: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2023-01-13 16:42:47 +00:00
Piers bae7d772e8 doc/go1.20: fix links to new strings functions
Links under strings package were linking to the bytes versions of the functions.

Change-Id: If6ebe37fede8e417f8683695783aa767bc01e9c7
GitHub-Last-Rev: 8849285122
GitHub-Pull-Request: golang/go#57579
Reviewed-on: https://go-review.googlesource.com/c/go/+/460458
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2023-01-04 21:15:31 +00:00
Alexander Yastrebov d03231d9ce doc/go1.20: fix http.ResponseController example
Fixes #57162

Change-Id: I190810d702e503822265b12c56db69ec1093233c
GitHub-Last-Rev: e8b259d4b3
GitHub-Pull-Request: golang/go#57385
Reviewed-on: https://go-review.googlesource.com/c/go/+/458275
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2023-01-03 18:53:52 +00:00
Xiao Cui db36eca33c doc/go1.20: fix typos
Change-Id: Ie2e583cba9e9bec7d642e323e77fb2d9b05dc7bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/459780
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-12-29 23:36:05 +00:00
Tobias Klauser 13ed4f42f0 doc/go1.20: fix typo
Change-Id: Ia0ce728ca18eefd835220b2076c4aa8ba00cda6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/458815
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
2022-12-22 00:19:49 +00:00
Robert Griesemer 628a1e7d3a doc/go1.20: fix typo
Change-Id: Icddf980e533b86ca955660ad028f5ad04b6aecbe
Reviewed-on: https://go-review.googlesource.com/c/go/+/457916
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2022-12-15 17:45:34 +00:00
Robert Griesemer 357ea85892 spec: fix typo
Fixes #57323.

Change-Id: I77d3d747aa4746bb9a8cca0c0500ff8fa6ae33a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/457915
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2022-12-15 16:18:42 +00:00
Robert Griesemer ea14d1b6e1 spec: document which recursive arrays and structs are valid/invalid
Fixes #5069.

Change-Id: I4bc0f52a9cd1e64a49846dffeb4be5cbecc29a96
Reviewed-on: https://go-review.googlesource.com/c/go/+/457342
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-12-14 22:29:38 +00:00
Heschi Kreinick 0b8add46ce doc/go1.20.html: pre-announce dropping Windows 7, 8, and friends
For #57003, #57004.

Change-Id: Ic1386a0ce83897411fbc68c83a9125af1cc11b54
Reviewed-on: https://go-review.googlesource.com/c/go/+/457695
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-14 21:01:46 +00:00
Robert Griesemer 5c682f94c6 spec: document illegal recursive type parameter lists
Fixes #40882.

Change-Id: I90f99d75e6d66f857b6ab8789c6d436f85d20993
Reviewed-on: https://go-review.googlesource.com/c/go/+/457515
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-12-14 19:13:24 +00:00
Robert Griesemer bd42aa86d3 spec: describe new semantics for comparable and constraint satisfaction
For #56548.
Fixes #57012.

Change-Id: I44f850522e52b1811025fb31bcef289da8f8089d
Reviewed-on: https://go-review.googlesource.com/c/go/+/457437
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2022-12-14 19:13:10 +00:00
Robert Griesemer ffefcd360b spec: introduce notion of strict comparability
- Rephrase the notion of "comparability" from a property
  of values (operands) to a property of types and adjust
  dependent prose.
- Introduce the notion of "strict comparability".
- Fix the definitions of comparability for type interfaces
  and type parameters.
- Define the predeclared identifier "comparable" as stricly
  comparable.

These changes address existing problems in the spec as outlined
in the section on "Related spec issues" in issue #56548.

For #56548.

Change-Id: Ibc8c2f36d92857a5134eadc18358624803d3dd21
Reviewed-on: https://go-review.googlesource.com/c/go/+/457095
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2022-12-14 19:12:15 +00:00
Alexander Frolov 6b895d9eaa doc/go1.20: fix typo
Change-Id: Id0319a9cc9acc549022fdcd6b7d71c7343afd245
GitHub-Last-Rev: 2b84d25763
GitHub-Pull-Request: golang/go#57187
Reviewed-on: https://go-review.googlesource.com/c/go/+/456395
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2022-12-12 14:20:13 +00:00
Shengyu Zhang 5dca7ed66f doc/go1.20: fix URL anchor
The URL anchor was invalid. Add the missing "array_or_" part.

Change-Id: Ib27f4d0f21b0148bea8b63ef962ba0ea30166ed3
GitHub-Last-Rev: f8addc6078
GitHub-Pull-Request: golang/go#57154
Reviewed-on: https://go-review.googlesource.com/c/go/+/456175
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2022-12-12 14:15:22 +00:00
Than McIntosh e76c87b191 doc: fix typo in 1.20 release notes
Fix typo.

Change-Id: Id3a78ac5d8ea429ba1685889cd1661aaca8572c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/456238
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-12-09 10:49:03 +00:00
Zhizhen He 8247b9f17a doc: fix typo
Change-Id: Ie639fe39b83336c0d885cdcb2fddc06f2b06c2dd
GitHub-Last-Rev: b5cc78ad42
GitHub-Pull-Request: golang/go#57082
Reviewed-on: https://go-review.googlesource.com/c/go/+/455196
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
2022-12-08 19:06:14 +00:00
Dmitri Shuralyov f368abb46e doc/go1.20: correct test binary -v flag value for test2json
The -v flag value is "test2json", not "json", since it emits output
in a custom format that the cmd/test2json tool interprets.
The cmd/test2json documentation and implementation have this right.

For #54202.

Change-Id: I2b52861d926e14488aa9fc89fff8c26da32ca710
Reviewed-on: https://go-review.googlesource.com/c/go/+/456124
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-12-08 18:29:35 +00:00
Michael Pratt 3ec5085eac doc/go1.20: delete remaining TODO
This section is complete.

For #54202.

Change-Id: I304cc55a5b8ed53e8b8dff73a5feb5ef39207846
Reviewed-on: https://go-review.googlesource.com/c/go/+/455895
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-07 16:49:08 +00:00
Than McIntosh f715d28cea doc/go1.20: add section on coverage
Add some basic material on the changes to code coverage testing
to the release notes.

For #54202.

Change-Id: I28200d43b4952ce8e8ecf46c8fe8e97c81d245e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/453857
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Eli Bendersky <eliben@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-12-07 16:26:42 +00:00
Russ Cox a4a86c7b24 doc/go1.20: relnote and take care of TODOs
The main change here is documenting the last-minute addition types.Satisfies.

Change-Id: I8be2d2ad730ba108706bd849b68cbd1f4d68a4b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/455698
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2022-12-07 14:20:49 +00:00
David Chase b45cb0ce86 doc: 1.20 compiler changes
This adds the nonPGO, non-coverage compiler changes
for the 1.20 release.  There's not that much user
visible change.

For #54202.

Change-Id: Ib2964ed5f7e73bb89c720d09b868ab79682f5070
Reviewed-on: https://go-review.googlesource.com/c/go/+/454536
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: David Chase <drchase@google.com>
2022-12-05 19:25:34 +00:00
Heschi Kreinick 7ab3615315 doc/go1.20: preannounce dropping macOS 10.13 and 10.14 support
For #23011.

Change-Id: I386920928a98403180098f1da5ea7696a239210e
Reviewed-on: https://go-review.googlesource.com/c/go/+/454957
Auto-Submit: Heschi Kreinick <heschi@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Heschi Kreinick <heschi@google.com>
2022-12-02 22:24:00 +00:00
Roland Shoemaker 3e2ab204a3 doc/go1.20: resolve root bundle package TODO
We're unlikely to get this package out of the door all that soon. For
now add a note that SetFallbackRoots will be most commonly used with
an TBA package, and link the tracking issue.

We could also just remove the "It will most commonly be used ..."
sentence.

Change-Id: Ie96134d757f5b4c69f1878d53c92b5ed602671e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/454056
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
2022-12-02 18:13:17 +00:00
Tobias Klauser c71d3a0f50 doc/go1.20: add code tags in crypto/{rsa,subtle} and net/netip sections
Change-Id: I516195fb1c2434feb3bf130d37012a98d77beeb6
Reviewed-on: https://go-review.googlesource.com/c/go/+/454235
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-01 21:01:03 +00:00
Cuong Manh Le 86963b458e doc: add release note for cgo.Incomplete
Updates #46731

Change-Id: Ie64e87d759c48642582342d221b24f77bb81d47a
Reviewed-on: https://go-review.googlesource.com/c/go/+/453556
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-12-01 21:00:41 +00:00
Robert Griesemer cc1771e2fd doc/go1.20: document new semantics for comparable constraint
For #54202.
For #56548.

Change-Id: If2b9e41813c3e1c8d373469a40e1bd0bd5ea2b16
Reviewed-on: https://go-review.googlesource.com/c/go/+/454595
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
2022-12-01 20:58:25 +00:00
Michael Anthony Knyszek 85ce1fd97f doc/go1.20: add runtime, runtime/trace, and runtime/pprof release notes
This change adds release notes for the "Runtime" section and updated
some of the release notes for runtime/trace and runtime/pprof after I
looked at the full list of runtime-related changes.

For #54202.

Change-Id: Id1395f4e6e02d3fcc248855ca98ad0ee26cae574
Reviewed-on: https://go-review.googlesource.com/c/go/+/454075
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
2022-11-30 19:32:42 +00:00
Tim King 60525dc31d spec: document conversion from slice to array
Document that a slice can be converted to either an array or a pointer
to an array of a matching underlying array type. This was documented in
the "Conversions from slice to array or array pointer" subsection, but
not in the list of conversion rules.

Updates #46505.

Change-Id: I16a89a63ef23c33580129952415e977a8f334009
Reviewed-on: https://go-review.googlesource.com/c/go/+/452936
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Tim King <taking@google.com>
2022-11-30 17:03:21 +00:00
Cherry Mui 53c480077a doc/go1.20: revise linker release note
I misunderstood CL 420774. We didn't remove GO_LDSO, just that
make.bash no longer tries to set it automatically. If GO_LDSO is
explicitly set at make.bash, it is still used as the default
dynamic interpreter.

For #54202.

Change-Id: Ided775438b8e4b87a6acd9bc87657657dbd3d91c
Reviewed-on: https://go-review.googlesource.com/c/go/+/453601
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
2022-11-29 18:26:16 +00:00
Cherry Mui 8c0f9ed4ce doc/go1.20: quote code in Bootstrap and Cgo sections
Add code tag for environment variables and file paths in the
Bootstrap section.

Add code tag for packages in the Cgo section.

Change-Id: Ib0fad1c09fbc497a097ef43cbf5850a27b9a6532
Reviewed-on: https://go-review.googlesource.com/c/go/+/453621
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-11-29 15:41:40 +00:00
Cherry Mui a4772376af doc/go1.20: add release notes for the linker
For #54202.

Change-Id: I06d7a44fb24427d783a9f57368dccce219b217bb
Reviewed-on: https://go-review.googlesource.com/c/go/+/453620
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Austin Clements <austin@google.com>
2022-11-28 23:32:35 +00:00
Cherry Mui 318e75bb7c doc/go1.20: add release notes for PGO
For #54202.
For #55022.

Change-Id: Ia3183e48536fa707c091094880d52fb75e7f6666
Reviewed-on: https://go-review.googlesource.com/c/go/+/453636
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
2022-11-28 23:32:00 +00:00
Tobias Klauser 0f28c478b2 doc/go1.20: fix missing <code> tag
Change-Id: I9c6f9ec28dbe038ddc195310a32d97d5b2a28ef5
Reviewed-on: https://go-review.googlesource.com/c/go/+/453695
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2022-11-28 17:25:47 +00:00
Russ Cox 9f0ffc9380 doc/go1.20: fix missing </code> tag
Change-Id: I8767696a62d8a814c7ed94abfd4b99ca0cab31f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/453635
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Bypass: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
2022-11-28 16:53:09 +00:00
Russ Cox 76ec47eeec doc/go1.20: complete, add more library TODOs
Finish all standard library TODOs, including additions
flagged by another run of relnote.

Change-Id: Ib9d22672b13b9775a98262d645aaf1d54e7494df
Reviewed-on: https://go-review.googlesource.com/c/go/+/453295
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
2022-11-28 16:06:53 +00:00
Brad Fitzpatrick cc7530daa1 doc/go1.20: fix HTML closing tag
Change-Id: I7e2519601bfe1a59a48e240ff67868b1d74d55d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/453516
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-28 15:02:55 +00:00
qmuntal ff18af8401 doc/go1.20: document changes to os on Windows
This CL documents the changes introduced by
https://go-review.googlesource.com/c/go/+/405275.

Change-Id: I541712d65f2823ecdf606c5b91035cde55ecdac6
Reviewed-on: https://go-review.googlesource.com/c/go/+/452735
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
2022-11-23 23:05:49 +00:00
Russ Cox 036696a2ea doc/go1.20: finish most standard library TODOs
Change-Id: Id8f074b96d28ae37a3d2d2a52a2b80cc53cd1203
Reviewed-on: https://go-review.googlesource.com/c/go/+/452760
TryBot-Bypass: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-11-23 20:07:39 +00:00
Russ Cox 109de31a1e doc/go1.20: document new freebsd/riscv64 port
Change-Id: I3931b84466f1ded9eecd8b70373ee183268a87a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/452759
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
2022-11-23 19:37:35 +00:00
Russ Cox 0e0b1cddf2 doc/go1.20: add hyperlinks, minor edits
Add links to all significant documentation symbols.
Fix or improve wording a few places.

Change-Id: I53277125eb75a8223a7464136e99accdb46744b7
Reviewed-on: https://go-review.googlesource.com/c/go/+/452757
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Bypass: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
2022-11-23 19:37:17 +00:00
Russ Cox a16f4175b5 doc/go1.20: document spec changes
Change-Id: I2e35bddfe20c96a8dc0ab187286aaf543ff66164
Reviewed-on: https://go-review.googlesource.com/c/go/+/452758
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-23 19:35:31 +00:00
Tim King 4c0c0e5d9c doc/go1.20: document adding to the timeformat vet analysis
Address the release notes TODO regarding the timeformat analyzer.

Change-Id: Ic132569d84d6e00eeed4ea49f2467e09af4b0756
Reviewed-on: https://go-review.googlesource.com/c/go/+/452915
Run-TryBot: Tim King <taking@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-23 18:23:24 +00:00
Robert Griesemer 72fdecafc0 spec: add a link to Allocation section in section on append built-in
If needed, the built-in function append allocates a new underlying
array. While we (probably) don't want to specify exactly how much
is allocated (the prose is deliberately vague), if there's more
space allocated than needed (cap > len after allocation), that
extra space is zeroed. Use an explicit link to the section on
Allocation which explicitly states that newly allocated memory
is zeroed.

Fixes #56684.

Change-Id: I9805d37c263b87860ea703ad143f738a0846247e
Reviewed-on: https://go-review.googlesource.com/c/go/+/452619
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2022-11-23 00:25:09 +00:00
Robert Griesemer 753ad5e1d5 spec: document that trailing comma is valid after index in index expressions
At parse time we don't know if a[i] is an index expression or a
type (or function) instantiation. Because instantiations accept
a list of type arguments, and argument lists permit a trailing
comma, a[i,] is either an instantiation or index expression.

Document that a trailing comma is permitted in the syntax for
index expressions.

For comparison, the same problem arises with conversions which
cannot be distinguished from function calls at parse time. The
spec also permits a trailing comma for conversions T(x,). The
grammar adjustment is the same (see line 5239).

Fixes #55007.

Change-Id: Ib9101efe52031589eb95a428cc6dff940d939f9e
Reviewed-on: https://go-review.googlesource.com/c/go/+/452618
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
2022-11-23 00:25:08 +00:00
Damien Neil 7a00f973a5 archive/tar, archive/zip: disable ErrInsecurePath by default
This change is being made late in the release cycle.
Disable it by default. Insecure path checks may be enabled by setting
GODEBUG=tarinsecurepath=0 or GODEBUG=zipinsecurepath=0.
We can enable this by default in Go 1.21 after publicizing the change
more broadly and giving users a chance to adapt to the change.

For #55356.

Change-Id: I549298b3c85d6c8c7fd607c41de1073083f79b1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/452616
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
2022-11-22 18:11:34 +00:00
Russ Cox 86ede17272 doc/go1.20: document math/rand autoseed and deprecation of Seed
Change-Id: Ie557f3841781ac47f4044a395106a2e5b13e9695
Reviewed-on: https://go-review.googlesource.com/c/go/+/452561
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-11-22 15:56:48 +00:00