1
0
mirror of https://github.com/golang/go synced 2024-11-12 00:20:22 -07:00
Commit Graph

3923 Commits

Author SHA1 Message Date
Alberto Donizetti
0914646ab9 doc/1.17: fix two dead rfc links
Updates #44513

Change-Id: Ia0c6b48bde2719f3a99cb216b6166d82159198d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/336930
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-07-23 18:10:55 +00:00
Ian Lance Taylor
48c88f1b1b reflect: add Value.CanConvert
For #395
For #46746

Change-Id: I4bfc094cf1cecd27ce48e31f92384cf470f371a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/334669
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2021-07-21 19:25:48 +00:00
Piers
c8f4e6152d spec: correct example comment in Conversions from slice to array
Fixes #47280

Change-Id: I78a8d235949b4878c7f075ac4ca37700e7e6c31c
GitHub-Last-Rev: 067f96eeb2
GitHub-Pull-Request: golang/go#47282
Reviewed-on: https://go-review.googlesource.com/c/go/+/335470
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Trust: Than McIntosh <thanm@google.com>
2021-07-19 21:59:24 +00:00
Ian Lance Taylor
21a04e3335 doc/go1.17: mention GOARCH=loong64
For #46229

Change-Id: I54d01d90f2b0c892d76121f1350c0e8cf4b2772f
Reviewed-on: https://go-review.googlesource.com/c/go/+/334729
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-07-15 00:09:22 +00:00
Austin Clements
cfbd73ba33 doc/go1.17: editing pass over the "Compiler" section
Change-Id: I08c082f548daa7011a8dc42769371329684c90e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/333609
Trust: Austin Clements <austin@google.com>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
2021-07-12 16:23:25 +00:00
Tobias Klauser
2ca44fe221 doc/go1.17: linkify time.UnixMilli and time.UnixMicro
Change-Id: I8503c4649fc42670f13d981f98af480467d6a3e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/332829
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-07-08 09:09:53 +00:00
Michael Anthony Knyszek
c96833e5ba doc: remove stale comment about arm64 port
Fixes #47079.

Change-Id: I8a671e3fdc13083e44e8d89064a5e7621e53bc4c
Reviewed-on: https://go-review.googlesource.com/c/go/+/333075
Trust: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2021-07-07 16:41:12 +00:00
Ian Lance Taylor
743f03eeb0 spec, unsafe: clarify unsafe.Slice docs
For #19367

Change-Id: If0ff8ddba3b6b48e2e198cf3653e73284c7572a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/332409
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2021-07-02 19:26:52 +00:00
Bryan C. Mills
4711bf30e5 doc/go1.17: linkify "language changes" in the runtime section
Change-Id: I82bd3954bfc5da59c7952eba2a28ff0e3b41427f
Reviewed-on: https://go-review.googlesource.com/c/go/+/331969
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-30 22:02:09 +00:00
Nigel Tao
d19a53338f image: add Uniform.RGBA64At and Rectangle.RGBA64At
These types already implemented the Image interface. They should also
implement the RGBA64Image interface (new in Go 1.17)

Updates #44808

Change-Id: I9a2b13e305997088ae874efb95ad9e1648f94812
Reviewed-on: https://go-review.googlesource.com/c/go/+/331570
Trust: Nigel Tao <nigeltao@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-30 02:00:49 +00:00
Levi(リーバイ)
e294b8a49e doc/go1.17: fix typo "MacOS" -> "macOS"
Change-Id: Ie2ada2bf875a93b1cc9e86a81c8a25de39ce4752
GitHub-Last-Rev: 462753db01
GitHub-Pull-Request: golang/go#46962
Reviewed-on: https://go-review.googlesource.com/c/go/+/331589
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-29 19:30:24 +00:00
Matthew Dempsky
1519271a93 spec: change unsafe.Slice((*T)(nil), 0) to return []T(nil)
Updates #46742.

Change-Id: I044933a657cd1a5cdb29863e49751df5fe9c258a
Reviewed-on: https://go-review.googlesource.com/c/go/+/331069
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-06-28 23:31:05 +00:00
Robert Griesemer
5bd09e5efc spec: unsafe.Add/Slice are not permitted in statement context
Add unsafe.Add and unsafe.Slice to the list of built-in functions
which are not permitted in statement context. The compiler and
type checker already enforce this restriction, this just fixes
a documentation oversight.

For #19367.
For #40481.

Change-Id: Iabc63a8db048eaf40a5f5b5573fdf00b79d54119
Reviewed-on: https://go-review.googlesource.com/c/go/+/329925
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-06-22 16:01:58 +00:00
Bryan C. Mills
1bd5a20e3c cmd/go: add a -go flag to 'go mod graph'
For #46366

Change-Id: I8417e6e4dbb8cb56ff7afc16893a01b7bb938217
Reviewed-on: https://go-review.googlesource.com/c/go/+/329529
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-06-21 21:21:09 +00:00
Jay Conrod
ced0fdbad0 doc/go1.17: note deprecation of 'go get' for installing commands
Fixes #43684

Change-Id: I8982f6816c002c71e62f37a926c8543e34b8b785
Reviewed-on: https://go-review.googlesource.com/c/go/+/329549
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-06-21 15:39:45 +00:00
Filippo Valsorda
7a5e7047a4 doc/go1.17: add Go 1.18 pre-announcements
Updates #41682
Updates #45428

Change-Id: Ia31d454284f0e114bd29ba398a2858fc90454032
Reviewed-on: https://go-review.googlesource.com/c/go/+/327811
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2021-06-21 14:58:02 +00:00
Filippo Valsorda
85a2e24afd doc/go1.17: add security-related release notes
Change-Id: I573def0f48fe66a1bc60fff321ab007c76b47ef0
Reviewed-on: https://go-review.googlesource.com/c/go/+/327810
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Katie Hockman <katie@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
2021-06-21 14:57:47 +00:00
Rob Findley
1de332996c doc/go1.17: document go/parser.SkipObjectResolution
Documents the mode added in CL 306149 to skip object resolution.

Fixes #46298

Change-Id: I6a14aaa00790f9f7e4e4ba17033355f5e878d74b
Reviewed-on: https://go-review.googlesource.com/c/go/+/329009
Trust: Robert Findley <rfindley@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-06-21 14:12:09 +00:00
Nigel Tao
86743e7d86 image: add RGBA64Image interface
The new RGBA64At method is equivalent to the existing At method (and the
new SetRGBA64 method is equivalent to the existing Set method in the
image/draw package), but they can avoid allocations from converting
concrete color types to the color.Color interface type.

Also update api/go1.17.txt and doc/go1.17.html

Fixes #44808

Change-Id: I8671f3144512b1200fa373840ed6729a5d61bc35
Reviewed-on: https://go-review.googlesource.com/c/go/+/311129
Trust: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2021-06-18 23:57:09 +00:00
Nick Miyake
6f22d2c682 doc/go1.17: fix typo
Change-Id: Ie8629e0f710d3eb95b4bbcc9c680ffc5004c2f15
GitHub-Last-Rev: 52f48f429c
GitHub-Pull-Request: golang/go#46812
Reviewed-on: https://go-review.googlesource.com/c/go/+/329289
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
2021-06-18 11:01:12 +00:00
yangwenmai
881b6ea7ba doc/go1.17: fix redundant space
Change-Id: I6fccab7504f928452fbe490ae83e8d4b23a59f06
Reviewed-on: https://go-review.googlesource.com/c/go/+/328849
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-06-17 02:42:36 +00:00
Michael Matloob
033d885315 doc/go1.17: document go run pkg@version
Fixes #46687

Change-Id: I6c311f15d3871a9824306b901fa0b81818ed2df8
Reviewed-on: https://go-review.googlesource.com/c/go/+/326870
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-06-15 17:05:31 +00:00
Josh Bleecher Snyder
7841cb14d9 doc/go1.17: assorted fixes
Change-Id: I64235ad920240de9e2414b9ee6f4cfc4006b2862
Reviewed-on: https://go-review.googlesource.com/c/go/+/327709
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-06-14 22:42:48 +00:00
Cherry Mui
d4f34f8c63 doc/go1.17: reword "results" in stack trace printing
"Results" may sound like the results from the previous sentence.
Reword to "function return values" for clarity.

Suggested by Tobias Kohlbau.

Change-Id: Ie78df36b5b191b06e98b802f9a46db6d067a8ea0
Reviewed-on: https://go-review.googlesource.com/c/go/+/327774
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Tobias Kohlbau <tobias@kohlbau.de>
2021-06-14 19:26:24 +00:00
Joel Sing
fdab5be159 doc/go1.17: further revise OpenBSD release notes
Simplify and remove forward-compatibility reference, as OpenBSD 6.9 has
already been released (1st of May 2021).

Updates #44513

Change-Id: I0a1abbb397f31d15c80a970edaa9723f894cafa9
Reviewed-on: https://go-review.googlesource.com/c/go/+/327652
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-06-14 15:30:14 +00:00
Brad Fitzpatrick
e2dc6dd5c9 doc/go1.17: clean up formatting of gofmt section
It was the only h3 in <code>, and it lacked <p> around its content.

It looked like it was part of the prior section:

    https://tip.golang.org/doc/go1.17#gofmt

Change-Id: I7e9ef70e9a03474225833f44420aabd70dab3cd5
Reviewed-on: https://go-review.googlesource.com/c/go/+/326774
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
2021-06-11 16:09:15 +00:00
Rhys Hiltner
2721da2608 doc/go1.17: fix formatting near httptest
Change-Id: Ic1a0add3a1e137ca5cd0f3e9ce3266191b0b55cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/326777
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-11 14:48:06 +00:00
Heschi Kreinick
182157c81a doc/go1.17: remove lingering TODO
As far as I can tell the Core Library section is complete. Remove its
TODO.

Change-Id: Ia84c6656fac045e25fae1a7ce8b488a3a26fd250
Reviewed-on: https://go-review.googlesource.com/c/go/+/326469
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2021-06-09 18:34:25 +00:00
Damien Neil
a5bc060b42 doc/go1.17: document strconv changes for Go 1.17
For #44513.
Fixes #46021.

Change-Id: I40a4645fedfae24f67e249743c6a143e71b9f507
Reviewed-on: https://go-review.googlesource.com/c/go/+/326150
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-09 18:32:06 +00:00
Heschi Kreinick
df35ade067 doc/go1.17: document //go:build lines
In 1.17, //go:build lines are fully supported. This entails changes to
the go command, vet, and gofmt. Document all of them.

I'm not Russ, but this is a significant change, it slipped under the
radar, and we're trying to get the release out. So here's what I got.

I wasn't sure where to put the go command change. On the one hand,
it's pretty significant. On the other, it certainly affects fewer
people than lazy loading. So it probably shouldn't be first, but I also
didn't want to bury it the middle of all the other module changes. Open
to suggestions.

Change-Id: Ia1a96bcfb1977973c5b0b0a6b18a9242a745af12
Reviewed-on: https://go-review.googlesource.com/c/go/+/326209
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-09 17:11:44 +00:00
Cherry Mui
ec3026d032 doc/go1.17: remove TODO for ports section
I'm not aware of anything more to mention for ports.

Change-Id: I686df8a230a55ad7f4c5eae43ca27f85fad9dd84
Reviewed-on: https://go-review.googlesource.com/c/go/+/326409
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-09 16:35:20 +00:00
Ian Lance Taylor
bcecae2af6 doc/go1.17: mention new possibility of type conversion panicking
For #44513
For #46020

Change-Id: I07c7a4268465c536d1866cc6bb1fad76b2b88b15
Reviewed-on: https://go-review.googlesource.com/c/go/+/326149
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2021-06-08 22:35:56 +00:00
Tim King
63dcab2e91 doc/go1.17: mention new vet checks sigchanyzer and stdmethods.
These vet checks were added in CL 299532 and CL 321389.

Also adds a TODO for buildtags.

Change-Id: I516dc77729f6d2dc147318260fe452831b115dfa
Reviewed-on: https://go-review.googlesource.com/c/go/+/322769
Trust: Tim King <taking@google.com>
Run-TryBot: Tim King <taking@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-08 22:32:06 +00:00
Cherry Mui
6551763a60 doc/go1.17: mention block profile bias fix
Re-apply the doc part of CL 324471, originally written by Felix Geisendörfer.

Change-Id: I831bead9a385bc5a5eed3058649a25ef17373bc6
Reviewed-on: https://go-review.googlesource.com/c/go/+/326171
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-08 20:45:46 +00:00
Cherry Mui
cb80937bf6 Revert "doc/go1.17: mention block profile bias fix"
This reverts CL 324471 (commit 689f4c7415).

Reason for revert: break ~all builders. And it is not a doc-only change.

Change-Id: Iadbdda34d2ca476a9f5e6c2d3a28592ed7ccb067
Reviewed-on: https://go-review.googlesource.com/c/go/+/326170
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2021-06-08 20:39:45 +00:00
Roland Shoemaker
d3e3d03666 net: reject leading zeros in IP address parsers
In both net.ParseIP and net.ParseCIDR reject leading zeros in the
dot-decimal notation of IPv4 addresses.

Fixes #30999
Fixes #43389

Change-Id: I2b6a31fe84db89ac828cf5ed03eaa586ee96ab68
Reviewed-on: https://go-review.googlesource.com/c/go/+/325829
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-06-08 20:23:22 +00:00
Cherry Mui
da4a640141 doc/go1.17: revise OpenBSD release notes
Updates #44513.

Change-Id: I64077859fa3061fee8327599875ad3870d603a81
Reviewed-on: https://go-review.googlesource.com/c/go/+/322856
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2021-06-08 20:19:17 +00:00
Felix Geisendörfer
689f4c7415 doc/go1.17: mention block profile bias fix
Change-Id: I76fd872b2d74704396f0683ffa9cec40b7027247
Reviewed-on: https://go-review.googlesource.com/c/go/+/324471
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-08 20:19:02 +00:00
Bryan C. Mills
9afe071c60 doc/go1.17: remove TODO for Tools section
Change-Id: I6cd7376bd051222a830cbf18cf7e887072b61f3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/325911
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-08 19:49:05 +00:00
Bryan C. Mills
f753d7223e doc/go1.17: resolve TODO for cmd/cover
Updates #32211

Change-Id: Ie38e831fcf557534023afd552d9394fe9e055caa
Reviewed-on: https://go-review.googlesource.com/c/go/+/325909
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-06-08 19:41:01 +00:00
Bryan C. Mills
9498b0155d cmd/go: in Go 1.17+ modules, add indirect go.mod dependencies separately from direct ones
Fixes #45965

Change-Id: If5c0d7b29e9f81be0763f3fa68051d4ef5419990
Reviewed-on: https://go-review.googlesource.com/c/go/+/325922
Trust: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-06-08 19:32:28 +00:00
Filippo Valsorda
949f00cebe doc/go1.17: add release notes for crypto packages
For #44513

Change-Id: I459b3a4f9936eaa2c09888177f91176140d04280
Reviewed-on: https://go-review.googlesource.com/c/go/+/325649
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2021-06-08 18:05:45 +00:00
Bryan C. Mills
0fb3e2c184 doc/go1.17: add a release note for the '-compat' flag to 'go mod tidy'
Updates #46141

Change-Id: I7a6a84f816e3db19bb492f862366a29dc46ed2ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/325910
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-06-08 17:24:39 +00:00
Matthew Dempsky
39c39ae52f doc: document Go 1.17 language changes
Fixes #46020.

Change-Id: Iadf9a0ac4a8863e17155d6ba1af2cc497634a634
Reviewed-on: https://go-review.googlesource.com/c/go/+/325870
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-07 23:44:22 +00:00
DQNEO
e1fa26026d spec: improve wording consistency by eliminating "specifier"
The word "specifier" is used once only here and technically not defined.

Change-Id: Ifc9f0582f4eb3c3011ba60d8008234de511d4be6
Reviewed-on: https://go-review.googlesource.com/c/go/+/323730
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Robert Griesemer <gri@golang.org>
2021-06-05 19:52:26 +00:00
DQNEO
f490134126 spec: improve wording by choosing an official term "keyword"
Replace "reserved word" by "keyword" as the latter is the official term.

Change-Id: I9f269759b872026034a9f47e4a761cff2d348ca0
Reviewed-on: https://go-review.googlesource.com/c/go/+/323729
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Robert Griesemer <gri@golang.org>
2021-06-05 19:51:45 +00:00
Aaron Sheah
c6b6211229 doc/go1.17: document testing changes for Go 1.17
For #44513. Fixes #46024

Change-Id: Icf3877d1fcd67448fbc79a0ce3db3f319ad4a0e9
GitHub-Last-Rev: 8c015935c2
GitHub-Pull-Request: golang/go#46324
Reviewed-on: https://go-review.googlesource.com/c/go/+/322109
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Jeremy Faller <jeremy@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-06-04 14:31:24 +00:00
Jeremy Faller
e11d14225c doc/go1.17: remove runtime section
Updates #44513

Change-Id: I359d56fc3eeece3005f092cca2cb485664affc23
Reviewed-on: https://go-review.googlesource.com/c/go/+/324209
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-06-02 17:34:43 +00:00
Ian Lance Taylor
6e189afd3e doc/go1.17: mention SYS_WAIT6/WEXITED on NetBSD
For #13987
For #16028
For #44513

Change-Id: I7a73446fcc80a01fa6de24eec1e5b993e543be37
Reviewed-on: https://go-review.googlesource.com/c/go/+/323489
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-06-02 16:25:20 +00:00
Uddeshya Singh
1c6a2ea2ea doc/go1.17: document time changes for Go1.17
Documents the newly implemented changes of
- Time.IsDST() method
- Addition of Time.UnixMilli, Time.UnixMicro and to-Time helpers UnixMicro, UnixMilli methods
- Addition of comma "," support as separator for fraction seconds

For #44513
Fixes #46026

Change-Id: Ib8d3449d3b061f013112d33362b50e68ad6ddffa
Reviewed-on: https://go-review.googlesource.com/c/go/+/317913
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-06-02 14:51:05 +00:00
KimMachineGun
d743e67e06 doc/go1.17: document flag changes for Go 1.17
For #44513
Fixes #46010

Change-Id: I1fe638e5db0b4f3b64dbfbd948154a7c7a80afc9
GitHub-Last-Rev: d5bd53b1df
GitHub-Pull-Request: golang/go#46150
Reviewed-on: https://go-review.googlesource.com/c/go/+/319273
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Robert Findley <rfindley@google.com>
2021-06-02 14:28:15 +00:00
Cherry Mui
2bec019fb5 doc/go1.17: add release notes for register ABI
Also delete the TODO for the linker section.

Updates #44513.
Updates #40724.

Change-Id: I4d62a907e8c3070831a052cdfe1e21648698df12
Reviewed-on: https://go-review.googlesource.com/c/go/+/323289
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-06-01 16:26:24 +00:00
Ian Lance Taylor
79bda65041 doc/go1.17: mention time.Layout
For #44513

Change-Id: Id4624e977654f7e8c489508a9dce98c9fab621a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/323490
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2021-05-29 01:59:17 +00:00
Ariel Mashraki
f6cc392d1d doc/go1.17: document text/template/parse.SkipFuncCheck
Documents the newly added mode that skips type checking
functions as per CL 301493.

Fixes #46025
For #34652
For #44513
For #38627

Change-Id: I56c4f65924702a931944796e39f43cfeb66abc8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/311569
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Michael Knyszek <mknyszek@google.com>
2021-05-29 00:16:11 +00:00
Ian Lance Taylor
1419ca7cea doc/go1.17: mention new definitions of MSG_CMSG_CLOEXEC
For #44513

Change-Id: I8c0070b116ee520a76726eb9d3dcbdd489a1fb1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/323351
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-28 18:41:07 +00:00
Ian Lance Taylor
6624771c83 doc/go1.17: mention testing.[TB].Setenv methods
For #41260
For #44513

Change-Id: I47ac0c751dafeb05abfe66fdf77938774164915f
Reviewed-on: https://go-review.googlesource.com/c/go/+/323353
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
2021-05-28 18:36:54 +00:00
Ian Lance Taylor
bbda923592 doc/go1.17: mention new Windows SysProcAttr fields
For #44011
For #44513

Change-Id: I512466f2e775e36098eb36ca7ef82333cd9e632a
Reviewed-on: https://go-review.googlesource.com/c/go/+/323352
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-28 18:35:37 +00:00
Ian Lance Taylor
6f58088bd8 doc/go1.17: document new go/build/BuildContext.ToolTags field
For #44513

Change-Id: Ib21af742e574fcaa7e38bb437d42dbeed9d01f0b
Reviewed-on: https://go-review.googlesource.com/c/go/+/323350
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-28 18:34:18 +00:00
Ian Lance Taylor
c295107708 doc/go1.17: mention new encoding/csv/Reader.FieldPos method
For #44221
For #44513

Change-Id: I2d2d1c55255f4411c11fd51f0f3ae726cbf4d136
Reviewed-on: https://go-review.googlesource.com/c/go/+/323349
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: roger peppe <rogpeppe@gmail.com>
2021-05-28 18:33:29 +00:00
Ian Lance Taylor
ccd9784edf doc/go1.17: document new debug/elf constant
For #39677
For #44513

Change-Id: I8c4193fd4359b83e6739e7e30a3a42b5f21b0f1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/323275
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-28 04:09:07 +00:00
Ian Lance Taylor
639acdc833 doc/go1.17: clarify that compress/lzw Reader and Writer types are new
For #26535
For #44513
For #46005

Change-Id: I70d3711ab6451a61b526abb3da8e91243f637656
Reviewed-on: https://go-review.googlesource.com/c/go/+/323273
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2021-05-27 23:51:57 +00:00
Damien Neil
ab2ef4aaa7 doc/go1.17: document reflect changes
For #44513.
Fixes #46019.

Change-Id: Ica84edd5703a4ccf343ff01e10483f8d51d1c79f
Reviewed-on: https://go-review.googlesource.com/c/go/+/323069
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-05-27 20:59:35 +00:00
Damien Neil
1d5298d46a doc/go1.17: document net/... changes
For #44513.
Fixes #46014.
Fixes #46015.
Fixes #46016.
Fixes #46017.

Change-Id: I356483d68d07159281dfe2ea1e49430ddf200973
Reviewed-on: https://go-review.googlesource.com/c/go/+/322891
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-05-26 22:43:54 +00:00
Damien Neil
0fbecece98 doc/go1.17: document syscall changes
Fixes #46023

Change-Id: Ia63829d03afb0936862b16f0971175cbaa1095bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/322890
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-05-26 22:41:55 +00:00
Damien Neil
02beecb397 mime: document use of the Shared MIME-Info Database
For #44513.
Fixes #46013.

Change-Id: I382603208aa94b66d5220cf0f418b8528a4e4148
Reviewed-on: https://go-review.googlesource.com/c/go/+/322892
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-05-26 22:41:35 +00:00
Cherry Mui
a92460fd2f doc/go1.17: add release notes for runtime/metrics package
Updates #44513.

Change-Id: I571a791e9c76371be3b3f1a323f1ea8ff485cf0f
Reviewed-on: https://go-review.googlesource.com/c/go/+/322857
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-05-26 18:33:56 +00:00
Cherry Mui
55aefbb268 doc/go1.17: mention enabling frame pointer on all ARM64
Updates #44513.

Change-Id: I43e95de0423779b3311d96c56f7c8c1cc5be27b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/321311
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-05-26 18:32:27 +00:00
Tobias Klauser
d050238bb6 doc/go1.17: fix formatting for time changes
Also add a link to the time.Time type and adjust the wording a bit.

Change-Id: I2f4210ada6d253eb5804e6327b2432487beb8a05
Reviewed-on: https://go-review.googlesource.com/c/go/+/321811
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-05-26 05:45:56 +00:00
Dan Scales
f22ec51deb doc: add Go 1.17 release note about inlining functions with closures
Fixes #45781

Change-Id: Ia5bc2845f7f94aff4f3f0ff15533feb148223adb
Reviewed-on: https://go-review.googlesource.com/c/go/+/322089
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-05-25 19:03:32 +00:00
Bryan C. Mills
8b462d7567 cmd/go: add a -compat flag to 'go mod tidy'
Fixes #46141

Change-Id: I9d4032e75252ade9eaa937389ea97ef3fb287499
Reviewed-on: https://go-review.googlesource.com/c/go/+/321071
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-05-25 13:18:26 +00:00
ian woolf
f87194cbd7 doc/go1.17: document changes to net/http package
Changes include:
* ReadRequest function now returns an error when a request has multiple
  Host headers.

For #44513.
Updates #46015.

Change-Id: I48ea7c5cee3f1d1a247035fd37191362a53d1f04
Reviewed-on: https://go-review.googlesource.com/c/go/+/317914
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Heschi Kreinick <heschi@google.com>
2021-05-21 23:46:07 +00:00
Keith Randall
217f5dd496 doc: document additional atomic.Value methods
For #44513. Fixes #46022.

Change-Id: Id1d87fbd4034461953760ce77201f87ed723ff88
Reviewed-on: https://go-review.googlesource.com/c/go/+/319549
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-05-21 22:39:16 +00:00
Jay Conrod
4fb10b2118 cmd/go: in 'go mod download' without args, don't save module zip sums
'go mod download' without arguments is frequently used to populate the
module cache. It tends to fetch a lot of extra files (for modules in
the build list that aren't needed to build packages in the main
module). It's annoying when sums are written for these extra files.

'go mod download mod@version' will still write sums for specific
modules in the build list. 'go mod download all' still has the
previous behavior.

For now, all invocations of 'go mod download' still update go.mod and
go.sum with changes needed to load the build list (1.15 behavior).

Fixes #45332

Change-Id: I9e17d18a7466ac7271a0e1a2b663f6b3cb168c97
Reviewed-on: https://go-review.googlesource.com/c/go/+/318629
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-05-21 17:49:01 +00:00
sryoya
4fda54ce3f doc/go1.17: document database/sql changes for Go 1.17
For #44513
Fixes #46008

Change-Id: If80d484f73a0eb6946abdc654eb2c0d3dd6db416
Reviewed-on: https://go-review.googlesource.com/c/go/+/320251
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Robert Findley <rfindley@google.com>
2021-05-21 17:43:46 +00:00
Adam Mitha
8876b9bd6a doc/go1.17: document io/fs changes for Go 1.17
For #44513
Fixes #46011

Change-Id: I862ef9a4314cd34fb8c828a8cd7d0a7b36c6f683
Reviewed-on: https://go-review.googlesource.com/c/go/+/320151
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Heschi Kreinick <heschi@google.com>
Trust: Robert Findley <rfindley@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-21 17:35:47 +00:00
Aaron Sheah
5fee772c87 doc/go1.17: document archive/zip changes for Go 1.17
For #44513. Fixes #46000

Change-Id: I299d0b5657f1f96174d6e35d60daac8b36e59d29
GitHub-Last-Rev: e63461bff0
GitHub-Pull-Request: golang/go#46235
Reviewed-on: https://go-review.googlesource.com/c/go/+/320809
Reviewed-by: Heschi Kreinick <heschi@google.com>
Trust: Robert Findley <rfindley@google.com>
2021-05-21 17:35:02 +00:00
Vishal Dalwadi
7c692cc7ea doc/go1.17: document changes to os package
Documents the changes to File.WriteString method.

For #44513.
Fixes #46018.

Change-Id: I3a8ef9df9f84662614d54802710bd705d626b995
Reviewed-on: https://go-review.googlesource.com/c/go/+/317910
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
2021-05-20 17:40:58 +00:00
Cherry Mui
def5360541 doc/go1.17: add release notes for OpenBSD ports
Updates #44513.

Change-Id: I8758768f6231fd7fcbaa7109eb49ee56cd60d93d
Reviewed-on: https://go-review.googlesource.com/c/go/+/321310
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-20 16:09:44 +00:00
Cherry Mui
ef1f52cc38 doc/go1.17: add release note for windows/arm64 port
Updates #44513, #42604.

Change-Id: I8200e8087c219a0042ab2a6770a7275c3b17942a
Reviewed-on: https://go-review.googlesource.com/c/go/+/321309
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-20 16:09:29 +00:00
Vishal Dalwadi
bb7495a46d doc/go1.17: document new math constants
Documents the newly introduced:
* MaxInt
* MinInt
* MaxUint

Updates #28538.
For #44513.
Fixes #46012.

Change-Id: Iab6bbcf8f76ebe105b973d5fd39b86b8cd078348
Reviewed-on: https://go-review.googlesource.com/c/go/+/317911
Trust: Heschi Kreinick <heschi@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-05-20 16:08:35 +00:00
Jeff Widman
8b0901fd32 doc/go1.17: fix typo "avoding" -> "avoiding"
Change-Id: Ice4a6e7ec8175caf3f049ac1ca39929059f90e9c
GitHub-Last-Rev: a2d59d5551
GitHub-Pull-Request: golang/go#46227
Reviewed-on: https://go-review.googlesource.com/c/go/+/320729
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
2021-05-18 07:50:25 +00:00
Joe Tsai
3980c4db19 doc/go1.17: fill in TODO for compress/lzw package
Fixes #46005

Change-Id: I80ca21eb64d245749af62506ba960dbc1726c6c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/318012
Trust: Joe Tsai <joetsai@digital-static.net>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-07 21:01:09 +00:00
Joe Tsai
d80d1427a8 doc/go1.17: fill in TODO for reflect package
Updates #46019

Change-Id: I3025927d949ff72535542e89b83dd830e969c255
Reviewed-on: https://go-review.googlesource.com/c/go/+/318011
Trust: Joe Tsai <joetsai@digital-static.net>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-07 20:44:40 +00:00
Emmanuel T Odeke
af6123a865 doc/go1.17: document encoding/binary.Uvarint max read of 10 bytes
Updates #41185
For #44513.
Fixes #46009

Change-Id: I60f4d891b897809765acc0aace037c78e95bb4f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/317929
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Keith Randall <khr@golang.org>
2021-05-07 18:14:25 +00:00
Joe Tsai
b44c78b8c3 doc/go1.17: fill in TODO for strconv package
Updates #46021

Change-Id: Iaed26b5a1defa6c5d00fb7a3998db56d2f1b96b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/318010
Trust: Joe Tsai <joetsai@digital-static.net>
Trust: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-05-07 17:43:31 +00:00
Dmitri Shuralyov
a0eb662d85 doc/go1.17: move language specification TODO to the right place
It was misplaced by the relnote tool.

Also add a TODO for CL 312212, per discussion in golang.org/issue/46020.

For #44513.
For #46020.

Change-Id: I8d766df969f85c351ead18df3e45adb6fb27b7a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/317829
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-05-07 14:16:52 +00:00
Roland Shoemaker
90d6bbbe42 crypto/tls: enforce ALPN overlap when negotiated on both sides
During the TLS handshake if the server doesn't support any of the
application protocols requested by the client, send the
no_application_protocol alert and abort the handshake on the server
side. This enforces the requirements of RFC 7301.

Change-Id: Iced2bb5c6efc607497de1c40ee3de9c2b393fa5d
Reviewed-on: https://go-review.googlesource.com/c/go/+/289209
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-05-06 18:57:43 +00:00
Dmitri Shuralyov
54e20b505d doc/go1.17: document fixes for negative rune handling
CL 317273 accidentally grouped a fix for bufio, bytes, strings
packages into a single entry, but they should be separate ones.

Fix that, and document these negative rune handling fixes.

The list of fixed functions in package unicode was computed by
taking the functions covered by the new TestNegativeRunes test,
and including those that fail when tested with Go 1.16.3.

For #44513.
Updates #43254.

Change-Id: I6f387327f83ae52543526dbdcdd0bb5775c678bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/317469
Reviewed-by: David Benjamin <davidben@google.com>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Trust: Alexander Rakoczy <alex@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
2021-05-06 15:33:43 +00:00
Dmitri Shuralyov
15557af207 doc/go1.17: fill in Go 1.17 release note TODOs using relnote
For #44513.

Change-Id: I8e0b044ebe39e3406c96f219eb921518f047be3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/317273
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2021-05-05 20:34:22 +00:00
Dmitri Shuralyov
d19e5493bd doc/go1.17: require macOS 10.13 or later
For #44513.
For #23011.

Change-Id: Ic092e38da3601a43d7e2110f500db4a6a6f845f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/316889
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-05-04 20:50:35 +00:00
Bryan C. Mills
86e42c2fbf cmd/go: suppress SSH password prompts when fetching modules or repos
We were already setting GIT_SSH_COMMAND (if unset) to explicitly
include 'ControlMaster=no' in order to disable connection pooling.
Now we also set 'BatchMode=yes' to suppress password prompts for
password-protected keys.

While we're here, we also set GCM_INTERACTIVE=never to suppress
similar prompts from the Git Credential Manager for Windows.

Fixes #44904

Change-Id: Iebb050079ff7dd54d5b944c459ae212e9e6f2579
Reviewed-on: https://go-review.googlesource.com/c/go/+/300157
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-05-04 15:03:06 +00:00
Kevin Burke
bb09f8a29b time: make time.Time print a valid Go string with %#v
Previously calling fmt.Sprintf("%#v", t) on a time.Time value would
yield a result like:

    time.Time{wall:0x0, ext:63724924180, loc:(*time.Location)(nil)}

which does not compile when embedded in a Go program, and does not
tell you what value is represented at a glance.

This change adds a GoString method that returns much more legible
output:

    "time.Date(2009, time.February, 5, 5, 0, 57, 12345600, time.UTC)"

which gives you more information about the time.Time and also can be
usefully embedded in a Go program without additional work.

Update Quote() to hex escape non-ASCII characters (copying logic
from strconv), which makes it safer to embed them in the output of
GoString().

Fixes #39034.

Change-Id: Ic985bafe4e556f64e82223c643f65143c9a45c3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/267017
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
2021-05-02 20:59:26 +00:00
Bryan C. Mills
eb71887b99 cmd/go: prune go.mod and go.sum files from vendored dependencies
Fixes #42970

Change-Id: I79246ef7fc16ae05c8e7b40ffb239a61f6415447
Reviewed-on: https://go-review.googlesource.com/c/go/+/315410
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-04-30 18:14:18 +00:00
Bryan C. Mills
c3365ad5f2 cmd/go: annotate versions in vendor/modules.txt
In order to prevent edit wars with previous cmd/go releases,
the new version annotations are only included if the main module
specifies 'go 1.17' or higher.

Fixes #36876

Change-Id: Iba15e47dd1ac2c16d754679a9b501db4069fa250
Reviewed-on: https://go-review.googlesource.com/c/go/+/315409
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-04-30 18:07:24 +00:00
Bryan C. Mills
7dedc237c5 cmd/go: smooth out upgrade paths for lazy loading
This change adds two possible upgrade paths for lazy loading:

1. Run 'go mod tidy -go=1.17'.

2. Starting in a module with no existing 'go' directive,
   run any 'go' command that updates the go.mod file.

In the latter case, commands other than 'go mod tidy'
may leave the go.mod file *very* untidy if it had non-trivial
dependencies. (The 'go' invocation will promote all
implicit eager dependencies to explicit lazy ones,
which preserves the original module graph — most of which is
not actually relevant.)

'go mod tidy -go=1.17' can be used to enable lazy loading without
accidentally downgrading existing transitive dependencies.

'go mod tidy -go=1.16' can be used to disable lazy loading and clear
away redundant roots in a single step (if reducing the go version), or
to prune away dependencies of tests-of-external-tests (if increasing
the go version).

'go mod tidy -go=1.15' can be used to add dependencies of
tests-of-external-tests, although there isn't much point to that.

DO NOT MERGE

This change still needs an explicit test and a release note.

Fixes #45094
For #36460

Change-Id: I68f057e39489dfd6a667cd11dc1e320c1ee1aec1
Reviewed-on: https://go-review.googlesource.com/c/go/+/315210
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-04-30 18:06:46 +00:00
Bryan C. Mills
9a81702b97 cmd/go: enable lazy loading
This change activates the dormant “lazy loading” codepaths added in CL
265777 and its predecessors. Dependencies of modules that declare 'go
1.17' or higher are loaded lazily, and the dependencies in the go.mod
file maintain additional invariants to support more efficient lazy
loading for downstream dependent modules.

See https://golang.org/design/36460-lazy-module-loading for the
detailed design.

For #36460

Change-Id: Ic12ee7842aef9580357fcf8909d87654fcb2ad12
Reviewed-on: https://go-review.googlesource.com/c/go/+/314634
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-04-30 18:05:18 +00:00
Robert Griesemer
764f53eb6c spec: clarify conditions for switch expression type
1. The existing prose implied that a switch expression type must
   be comparable because it is tested for equality against all case
   expressions. But for an empty switch (no case expressions), it
   was not clear if the switch expression needed to be comparable.
   Require it to match the behavior of compiler and type checkers.

2. While making this change, remove redundant language explaining
   what happens with untyped boolean switch expression values: the
   default type of an untyped boolean value is bool, this is already
   covered by the first part of the relevant sentence.

Fixes #43200.

Change-Id: Id8e0f29cfa8722b57cd2b7b58cba85b58c5f842b
Reviewed-on: https://go-review.googlesource.com/c/go/+/314411
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Rob Pike <r@golang.org>
2021-04-28 18:50:51 +00:00
lixianyang
c249491572 doc: change <a/> to </a> in spec
Change-Id: I21d0ee83c9204d51c587bd944209df2232b460ad
GitHub-Last-Rev: 47fab8dc58
GitHub-Pull-Request: golang/go#45771
Reviewed-on: https://go-review.googlesource.com/c/go/+/313449
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-04-27 04:44:55 +00:00
Matthew Dempsky
1da05eb0ce spec: add unsafe.Add and unsafe.Slice
Updates #19367.
Updates #40481.

Change-Id: I578066ad68d2cd6bea50df1a534cf799e4404a7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/312212
Trust: Matthew Dempsky <mdempsky@google.com>
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2021-04-22 22:03:10 +00:00
Josh Bleecher Snyder
1c268431f4 spec: allow conversion from slice to array ptr
Implementation follows in subsequent changes.

Updates #395

Change-Id: Ic97ee822805e4c236fdd9d224e776cb2ae62c817
Reviewed-on: https://go-review.googlesource.com/c/go/+/216424
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2021-04-20 23:47:34 +00:00
Jay Conrod
cde92846e2 doc: add release note for module deprecation
Fixes #40357

Change-Id: I876edd7364530b77343ebcdd4032390493f8d031
Reviewed-on: https://go-review.googlesource.com/c/go/+/309549
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-04-16 14:13:38 +00:00
Changkun Ou
972e883925 runtime/cgo: add Handle for managing (c)go pointers
A non-trivial Cgo program may need to use callbacks and interact with
go objects per goroutine. Because of the rules for passing pointers
between Go and C, such a program needs to store handles to associated
Go values. This often causes much extra effort to figure out a way to
correctly deal with: 1) map collision; 2) identifying leaks and 3)
concurrency.

This CL implements a Handle representation in runtime/cgo package, and
related methods such as Value, Delete, etc. which allows Go users can
use a standard way to handle the above difficulties.

In addition, the CL allows a Go value to have multiple handles, and the
NewHandle always returns a different handle compare to the previously
returned handles. In comparison, CL 294670 implements a different
behavior of NewHandle that returns a unique handle when the Go value is
referring to the same object.

Benchmark:
name                      time/op
Handle/non-concurrent-16  487ns ± 1%
Handle/concurrent-16      674ns ± 1%

Fixes #37033

Change-Id: I0eadb9d44332fffef8fb567c745246a49dd6d4c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/295369
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Cherry Zhang <cherryyz@google.com>
2021-04-06 23:39:42 +00:00
Bryan C. Mills
3b0d28808d cmd/go: assume Go 1.16 instead of Go 1.11 for dependencies that lack explicit 'go' directives
Fixes #45109
Updates #44976
Updates #36876

Change-Id: Icb00f8b6e0d4e076d82da1697e7058b9e7603916
Reviewed-on: https://go-review.googlesource.com/c/go/+/303229
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-03-19 19:59:56 +00:00
Bryan C. Mills
7e00049b55 cmd/go: only add a 'go' directive to the main module when the go.mod file will be written
Then, write the 'go.mod' file with that version before further
processing. That way, if the command errors out due to a change in
behavior, the reason for the change in behavior will be visible in the
file diffs.

If the 'go.mod' file cannot be written (due to -mod=readonly or
-mod=vendor), assume Go 1.11 instead of the current Go release.
(cmd/go has added 'go' directives automatically, including in 'go mod
init', since Go 1.12.)

For #44976

Change-Id: If9d4af557366f134f40ce4c5638688ba3bab8380
Reviewed-on: https://go-review.googlesource.com/c/go/+/302051
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2021-03-17 21:24:05 +00:00
Robert Griesemer
63b0a0a5b8 spec: fix rendering of >=
Follow-up on https://golang.org/cl/297249.

Change-Id: Ib4df91df530e4e7d7dd8c54d89c834cee55031f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/302370
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-03-17 00:18:28 +00:00
nobishino
13a0f7b502 spec: clarify that signed integers>=0 are permitted as shift counts
In Go1.13 and above, signed integers are permitted as shift counts as long as they are >=0.
However, the comments in the "Arithmetic operators" section says shift operators accept "unsigned integer" as of right operands. Replacing this with "integer>=0" resolves the misunderstanding that shift
operators permit only unsigned integers.

Reference: Go1.13 Release Notes: https://golang.org/doc/go1.13

Change-Id: Icd3c7734d539ab702590e992a618c9251c653c37
GitHub-Last-Rev: 4f263a48d3
GitHub-Pull-Request: golang/go#44664
Reviewed-on: https://go-review.googlesource.com/c/go/+/297249
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Robert Griesemer <gri@golang.org>
2021-03-16 19:51:31 +00:00
Johan Brandhorst
860704317e crypto/tls: add HandshakeContext method to Conn
Adds the (*tls.Conn).HandshakeContext method. This allows
us to pass the context provided down the call stack to
eventually reach the tls.ClientHelloInfo and
tls.CertificateRequestInfo structs.
These contexts are exposed to the user as read-only via Context()
methods.

This allows users of (*tls.Config).GetCertificate and
(*tls.Config).GetClientCertificate to use the context for
request scoped parameters and cancellation.

Replace uses of (*tls.Conn).Handshake with (*tls.Conn).HandshakeContext
where appropriate, to propagate existing contexts.

Fixes #32406

Change-Id: I259939c744bdc9b805bf51a845a8bc462c042483
Reviewed-on: https://go-review.googlesource.com/c/go/+/295370
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-03-16 14:05:45 +00:00
witchard
312fd9937d cmd/go: remove -insecure flag on go get
Resolves #37519

Change-Id: Iba675a180b0e61b12835cdb6ecd4c6dc61e0605c
GitHub-Last-Rev: aa018af6f8
GitHub-Pull-Request: golang/go#44724
Reviewed-on: https://go-review.googlesource.com/c/go/+/297709
Trust: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-03-02 21:49:08 +00:00
DQNEO
084b07d6f6 spec: improve sentence structure for passing a slice
Change-Id: I453d06da2f596eb0b99905aec46a05547d73c62c
Reviewed-on: https://go-review.googlesource.com/c/go/+/290872
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Robert Griesemer <gri@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2021-02-24 05:23:32 +00:00
Dmitri Shuralyov
74903553bc doc: start draft go1.17 release notes, move go1.16 to x/website
This template is based on CL 248198 and previous ones like it.
Continue to eagerly include often-used sections, and clarify that
the TODO is about completing the section, or removing if it turns
out not to be needed.

Move the Go 1.16 release notes to x/website, since that's the new
home for past Go release notes as of CL 291711. They're added to
x/website in CL 295249.

'relnote -html' does not report any CLs with RELNOTE annotations
since 2021/02/01.

For #44513.
Updates #40700.

Change-Id: Idd389335500ec4dec2764cbbaa385918cc8a79ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/295209
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-02-23 21:45:12 +00:00
Alberto Donizetti
40656f3a75 doc/1.16: fix link to fs.FileInfo
Updates #40700

Change-Id: Ifff622ccadaa31c0c0684c3c695aadcaa2305623
Reviewed-on: https://go-review.googlesource.com/c/go/+/294669
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-02-20 19:33:34 +00:00
Robert Griesemer
078f08f0ee spec: every type has a method set (minor clarification)
The spec states that a type "may" have a method set associated with it.
Yet every type has a method set, which may be empty. This is clarified
later in the same paragraph. Be clear in the first sentence as well.

Per the suggestion from https://github.com/DQNEO.

Fixes #44318.

Change-Id: I6097b1c7062853e404b7fead56d18a7f9c576fc3
Reviewed-on: https://go-review.googlesource.com/c/go/+/292853
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-02-20 00:01:22 +00:00
Dmitri Shuralyov
6530f2617f doc/go1.16: remove draft notice
Fixes #40700.

Change-Id: I99ed479d1bb3cdf469c0209720c728276182a7a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/291809
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-02-16 16:26:11 +00:00
KimMachineGun
353e111455 doc/go1.16: fix mismatched id attribute
For #40700.

Change-Id: I186a21899404bfb79c08bfa8623caf9da74b6b0d
GitHub-Last-Rev: 25d240db3c
GitHub-Pull-Request: golang/go#44145
Reviewed-on: https://go-review.googlesource.com/c/go/+/290329
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-02-16 15:56:38 +00:00
Russ Cox
0cb3415154 doc: remove all docs not tied to distribution
They have moved to x/website in CL 291693.
The docs that are left are the ones that are edited at the same time
as development in this repository and are tied to the specific version
of Go being developed. Those are:

 - the language spec
 - the memory model
 - the assembler manual
 - the current release's release notes

Change-Id: I437c4d33ada1b1716b1919c3c939c2cacf407e83
Reviewed-on: https://go-review.googlesource.com/c/go/+/291711
Trust: Russ Cox <rsc@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-02-16 02:07:02 +00:00
Russ Cox
626ef08127 doc: remove install.html and install-source.html
These live in x/website/content/doc now.
The copies here just attract edits that have no actual effect.

For #40496.
For #41861.

Change-Id: I2fdd7375e373949eb9a88f4cdca440b6a5d45eea
Reviewed-on: https://go-review.googlesource.com/c/go/+/291709
Trust: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-02-16 02:06:56 +00:00
Ian Lance Taylor
33d72fd412 doc/faq: update generics entry to reflect accepted proposal
For #43651

Change-Id: Idb511f4c759d9a77de289938c19c2c1d4a542a17
Reviewed-on: https://go-review.googlesource.com/c/go/+/291990
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2021-02-15 01:54:22 +00:00
Bryan C. Mills
ff0e93ea31 doc/go1.16: note that package path elements beginning with '.' are disallowed
For #43985

Change-Id: I1a16f66800c5c648703f0a0d2ad75024525a710f
Reviewed-on: https://go-review.googlesource.com/c/go/+/291389
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-02-12 18:20:28 +00:00
DQNEO
26ceae85a8 spec: More precise wording in section on function calls.
A caller is not always in a function.

For example, a call can appear in top level declarations.

e.g. var x = f()

Change-Id: I29c4c3b7663249434fb2b8a6d0003267c77268cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/290849
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>
2021-02-11 17:55:50 +00:00
KimMachineGun
dc725bfb3c doc/go1.16: mention new vet check for asn1.Unmarshal
This vet check was added in CL 243397.

For #40700.

Change-Id: Ibff6df9395d37bb2b84a791443578009f23af4fb
GitHub-Last-Rev: e47c38f630
GitHub-Pull-Request: golang/go#44147
Reviewed-on: https://go-review.googlesource.com/c/go/+/290330
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-02-08 23:32:14 +00:00
KimMachineGun
724d0720b3 doc/go1.16: add missed heading tag in vet section
Add missed heading tag in CL 276373.

For #40700

Change-Id: Ida9e8861589bbc296a5a1cecbf9fe33fa09ed0ca
GitHub-Last-Rev: d218f8d4b7
GitHub-Pull-Request: golang/go#44111
Reviewed-on: https://go-review.googlesource.com/c/go/+/289869
Reviewed-by: Tim King <taking@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Tim King <taking@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-02-05 23:13:11 +00:00
task4233
fca94ab3ab spec: improve the example in Type assertions section
The example, var v, ok T1 = x.(T), can be interpreted as type T1 interface{} or type T = bool; type T1 = T.
Separating the example would help understanding for readers.

Change-Id: I179f4564e67f4d503815d29307df2cebb50c82f9
GitHub-Last-Rev: b34fffb6bb
GitHub-Pull-Request: golang/go#44040
Reviewed-on: https://go-review.googlesource.com/c/go/+/288472
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Robert Griesemer <gri@golang.org>
2021-02-02 16:35:53 +00:00
Cherry Zhang
0b6cfea634 doc/go1.16: document that on OpenBSD syscalls are now made through libc
Updates #36435, #40700.

Change-Id: I1e2ded111ad58066cc9f2c9d00e719497b0f34d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/287634
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
2021-02-01 16:54:54 +00:00
Toshihiro Shiino
6ac91e460c doc/go1.16: minor markup fixes
Add missing <code> tags.
Remove unnecessary <br> tag.

For #40700

Change-Id: I03d3ce1c89a9ae3d3195dcd2bb8b1a61f011e1ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/288275
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
2021-02-01 05:14:58 +00:00
Ian Lance Taylor
4b068cafb5 doc/go1.16: document go/build/constraint package
For #40700
For #41184
Fixes #43957

Change-Id: Ia346f4cf160431b721efeba7dc5f1fb8814efd95
Reviewed-on: https://go-review.googlesource.com/c/go/+/287472
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-01-28 05:46:54 +00:00
Ryuji Iwata
210f70e298 doc/go1.16: fix closing brace in .Export format
A parenthesis of go list "-f" flag format is double curly braces.

Change-Id: Ifd38e0b0ae3c46272a4acd65584818228168b7c6
GitHub-Last-Rev: b46030492b
GitHub-Pull-Request: golang/go#43924
Reviewed-on: https://go-review.googlesource.com/c/go/+/286752
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
2021-01-27 08:36:43 +00:00
Ian Lance Taylor
bf0f7c9d78 doc/go1.16: mention os.DirFS in os section
For #40700
For #41190

Change-Id: I8ade6efd5be09003fc3e5db5a9b91ba6e0f023f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/285593
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-01-25 23:54:44 +00:00
Ian Lance Taylor
ad2ca26a52 doc/go1.16: mention os.DirEntry and types moved from os to io/fs
For #40700
For #41467
For #41190

Change-Id: Id94e7511c98c38a22b1f9a55af6e200c9df07fd3
Reviewed-on: https://go-review.googlesource.com/c/go/+/285592
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-01-25 23:53:53 +00:00
Ian Lance Taylor
a51921fa5b doc/go1.16: mention new testing/iotest functions
For #38781
For #40700
For #41190

Change-Id: I72f1055e51edb517041d3861640734ba6ef5f342
Reviewed-on: https://go-review.googlesource.com/c/go/+/285673
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-01-25 23:52:43 +00:00
Ian Lance Taylor
e6b6d107f7 doc/go1.16: mention deprecation of io/ioutil
For #40025
For #40700
For #42026

Change-Id: Ib51b5e1398c4eb811506df21e3bd56dd84bd1f7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/285377
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-01-25 22:54:28 +00:00
Ian Lance Taylor
96a276363b doc/go1.16: mention go/build changes
For #40070
For #41191
For #43469
For #43632

Change-Id: I6dc6b6ea0f35876a4c252e4e287a0280aca9d502
Reviewed-on: https://go-review.googlesource.com/c/go/+/285213
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-01-25 22:42:25 +00:00
Austin Clements
6de8443f3b doc/asm: add a section on go_asm.h, clean up go_tls.h section
Currently the only mention of go_asm.h is buried in a confusing
section about the runtime-specific go_tls.h header. We actually want
people to use go_asm.h, so this CL adds a section with a proper
discussion of this header. As part of this, we remove the discussion
of go_asm.h from the go_tls.h section and clean up what remains.

I stumbled on this when working on the internal ABI specification. I
wanted to refer to stable documentation on how to access struct fields
from assembly and found there was none.

Change-Id: I0d53741e7685e65794611939e76285f7c82e1d65
Reviewed-on: https://go-review.googlesource.com/c/go/+/286052
Trust: Austin Clements <austin@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-01-25 19:32:27 +00:00
Tobias Klauser
044f937a73 doc/go1.16: fix WalkDir and Walk links
Reported by Ben on golang-dev:
https://groups.google.com/g/golang-dev/c/gsoj5Vv15j0/m/XR9CYSRkAgAJ

For #40700.

Change-Id: If4702cf0e9858aaef99c231251dc646a67d1026e
Reviewed-on: https://go-review.googlesource.com/c/go/+/285718
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
2021-01-25 12:30:58 +00:00
Brad Fitzpatrick
b634f5d97a doc/go1.16: add crypto/x509 memory optimization
Change-Id: I0c61b0e0d1430f66e3f7dbf07817264258a1c15a
Reviewed-on: https://go-review.googlesource.com/c/go/+/285682
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
2021-01-23 19:46:15 +00:00
Brad Fitzpatrick
9897655c61 doc/go1.16: reword ambiguously parsable sentence
Change-Id: Idc54967e962352a598c9d4c563d1d9f51ec5c889
Reviewed-on: https://go-review.googlesource.com/c/go/+/285680
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
2021-01-23 19:46:06 +00:00
Ian Lance Taylor
cf10e69f17 doc/go1.16: mention net/http.Transport.GetProxyConnectHeader
For #40700
For #41048

Change-Id: Ida6bcaaf5edaa2bba9ba2b8e02ec9959481f8302
Reviewed-on: https://go-review.googlesource.com/c/go/+/285594
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2021-01-22 06:35:43 +00:00
Ian Lance Taylor
ec1b945265 doc/go1.16: mention path/filepath.WalkDir
For #40700
For #42027

Change-Id: Ifb73050dfdab21784fa52d758ad9c408e6489684
Reviewed-on: https://go-review.googlesource.com/c/go/+/285595
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2021-01-22 06:35:01 +00:00
Ian Lance Taylor
11def3d40b doc/go1.16: mention syscall.AllThreadsSyscall
For #1435
For #40700

Change-Id: I01d277617ab511c90b9663fc89e418402e5ee2be
Reviewed-on: https://go-review.googlesource.com/c/go/+/285597
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2021-01-22 06:33:04 +00:00
Ian Lance Taylor
07b0235609 doc/go1.16: add notes about package-specific fs.FS changes
For #40700
For #41190

Change-Id: I964d6856d5cad62c859d0f3a7afdd349a8ad87cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/285093
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-01-21 23:50:47 +00:00
Austin Clements
e2b4f1fea5 doc/go1.16: minor formatting fix
Change-Id: Ie924a15da0d9a35089d1d4b3d6c4a07b93bdf270
Reviewed-on: https://go-review.googlesource.com/c/go/+/285393
Trust: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-01-21 20:47:45 +00:00
Ian Lance Taylor
9f43a9e07b doc/go1.16: mention new debug/elf constants
For #40700

Change-Id: If105d2f043539bb0893f577a984f14ee3e7ca753
Reviewed-on: https://go-review.googlesource.com/c/go/+/285212
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-01-21 20:32:52 +00:00
Rebecca Stambler
759309029f doc: update editors.html for Go 1.16
Rerank editor plugins based on popularity (Go 2019 survey), and remove
Atom, as it is no longer popular.

Change-Id: I06d39b67eec24a920439b9ea1198b6e2a939874e
Reviewed-on: https://go-review.googlesource.com/c/go/+/283073
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-01-11 19:45:02 +00:00
Ian Lance Taylor
9ec21a8f34 Revert "reflect: support multiple keys in struct tags"
Proposal #40281 was initially accepted, but has now been declined.
This CL removes most of the work done to implement it.

Specifically this reverts CLs 248341, 274448, 274474, and 278392.

For #40281
For #43226

Change-Id: I5a9ebb4d9cb5fb0962434b64c59beb8343030be5
Reviewed-on: https://go-review.googlesource.com/c/go/+/281515
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-01-07 23:43:25 +00:00
Michael Matloob
9b55088d6b doc/go1.16: add release note for disallowing non-ASCII import paths
golang.org/cl/251878 disallowed non-ASCII characters in import paths,
in module mode. They were already disallowed in module paths, so this
change just extended the restriction to the package subdirectory of
the module. Update the release notes to alert users of this change.

Fixes #43052

Change-Id: I1caf9ef978dd3ac599a3f82c5c376ad62e6fc436
Reviewed-on: https://go-review.googlesource.com/c/go/+/282194
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2021-01-07 22:28:57 +00:00
Filippo Valsorda
4787e906cf crypto/x509: rollback new CertificateRequest fields
In general, we don't want to encourage reading them from CSRs, and
applications that really want to can parse the Extensions field.

Note that this also fixes a bug where the error of
parseKeyUsageExtension was not handled in parseCertificateRequest.

Fixes #43477
Updates #37172

Change-Id: Ia5707b0e23cecc0aed57e419a1ca25e26eea6bbe
Reviewed-on: https://go-review.googlesource.com/c/go/+/281235
Trust: Filippo Valsorda <filippo@golang.org>
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2021-01-06 21:24:47 +00:00
Dmitri Shuralyov
3dd5867605 doc: 2021 is the Year of the Gopher
What a year it has been. If there's one thing we can count on
at a time like this, it's that 2021 is the Year of the Gopher.

Change-Id: I4f6fbbe3d9b4b70df8fadd0d18237f05cd572265
Reviewed-on: https://go-review.googlesource.com/c/go/+/280163
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-01-01 20:05:20 +00:00
Cherry Zhang
b4a71c95d2 doc/go1.16: reference misc/ios/README for how to build iOS programs
Updates #43371, #43343.

Change-Id: Ib89b809a5220717507272453ea86224d1928dd36
Reviewed-on: https://go-review.googlesource.com/c/go/+/280154
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-29 20:35:10 +00:00
Andrey Bokhanko
49d0b239cb doc: fix a typo in contribute.html
A fix for a trivial (yet still confusing for neophytes like me!) typo in
contribute.html.

Change-Id: Ic68673fb2a3855c2b9e8042047087450e8793e6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/279452
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2020-12-23 17:01:35 +00:00
Johan Brandhorst
520f3b72db crypto/tls: revert "add HandshakeContext method to Conn"
This reverts CL 246338.

Reason for revert: waiting for 1.17 release cycle

Updates #32406

Change-Id: I074379039041e086c62271d689b4b7f442281663
Reviewed-on: https://go-review.googlesource.com/c/go/+/269697
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Katie Hockman <katie@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
2020-12-17 20:04:25 +00:00
Tobias Klauser
75e16f5127 doc/go1.16: add link to reflect.StructTag
For #40700.

Change-Id: I67dd55b435304e428929c9a54b8881f9b78efdfb
Reviewed-on: https://go-review.googlesource.com/c/go/+/278392
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-16 09:01:04 +00:00
Ian Lance Taylor
129bb1917b doc/go1.15: mention 1.15.3 cgo restriction on empty structs
For #40954

Change-Id: I6a30aed31a16e820817f4ca5c7f591222e922946
Reviewed-on: https://go-review.googlesource.com/c/go/+/277432
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2020-12-15 21:04:49 +00:00
Tobias Klauser
a508840c67 doc/go1.16: fix path, path/filepath release notes
The path package doesn't have a Glob function. Adjust the release notes
re. CL 264397 accordingly.

Also add links to the documentation of all mentioned functions.

For #40700.

Change-Id: Ibf3e0530fa6fab36a3f6fbc664f0800869ce9ec7
Reviewed-on: https://go-review.googlesource.com/c/go/+/278213
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-15 16:31:07 +00:00
Tobias Klauser
5046cb8a6e doc/go1.16: fix formatting in net, net/http and net/http/httputil sections
For #40700.

Change-Id: I83d9ef9f79d59a0165a47ccc938fc2bf40e90703
Reviewed-on: https://go-review.googlesource.com/c/go/+/278212
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-15 16:30:24 +00:00
Tobias Klauser
d06794da4a doc/go1.16: add missing <code> tag
For #40700.

Change-Id: I616429f82a44cea32701ed0af6e42ed6c71ee097
Reviewed-on: https://go-review.googlesource.com/c/go/+/277378
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-14 21:09:33 +00:00
Russ Cox
41d8e61a6b doc: make clear that Go 1.4 is not required for bootstrap
Go 1.4 does not work on some systems, including the most
recent versions of macOS. Make it clearer that that's not the only
way to bootstrap Go.

Change-Id: I7c03d6808e43bf26283a53eab2bb0b2dc4af73af
Reviewed-on: https://go-review.googlesource.com/c/go/+/277216
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-11 22:13:50 +00:00
Michael Matloob
1341a3decd cmd/go: add documentation for the -overlay flag
Also add -overlay to the Go 1.16 release notes.

For #40700
Fixes #39958
Fixes #42893

Change-Id: Ifd397549e368b255e7b8800986cfa0563a942af5
Reviewed-on: https://go-review.googlesource.com/c/go/+/274714
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2020-12-11 17:26:14 +00:00
Tim King
1fe891a937 doc/go1.16: add vet release note for CL 235677
For #40700
Fixes #42895

Change-Id: I05b60f0d000512d5dddb3d61e0e695aa01943d6a
Reviewed-on: https://go-review.googlesource.com/c/go/+/274617
Trust: Tim King <taking@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-10 23:11:25 +00:00
Dmitri Shuralyov
6d3d3fb37f doc/go1.16: address some remaining high-level TODOs
The tools section TODO can be removed since the tools section looks
complete by now.

All TODOs in the minor changes to the library section have been done,
so the top-level TODO is resolved. Delete it.

The currently highlighted entries under Core library section look
good. It's worth reviewing this further based on feedback from Go
1.16 pre-releases, so keep the TODO but make it non-user-visible
to unblock Go 1.16 Beta 1.

For #40700.

Change-Id: Ie72661bd457b0a93ef92e1bfc0844072f3b618a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/277212
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-10 22:58:49 +00:00
Keith Randall
ae9b442df2 doc: add description of new framepointer vet check
Update #43014

Change-Id: I5fbfaa16e6acb8859fd0b1188f532f5a225f6349
Reviewed-on: https://go-review.googlesource.com/c/go/+/276373
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-09 01:34:53 +00:00
Austin Clements
48d6275952 doc/go1.16: improve channel race detector changes description
Based on text from Daniel Fava.

For #40700.

Change-Id: I0bc3a4340b8a777ff96d3cf226a7d51d3f65db2c
Reviewed-on: https://go-review.googlesource.com/c/go/+/275786
Trust: Austin Clements <austin@google.com>
Reviewed-by: Daniel Fava <danielsfava@gmail.com>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
2020-12-08 15:58:23 +00:00
Austin Clements
6362d01c15 doc/go1.16: update linker stats
benchstat v2 comparison vs HEAD:

                    1.15.6                    1.16
                    sec/op       sec/op           vs base
LinkIstio-48        4.44 ± 1%   3.43 ± 1%  -22.79% (p=0.000 n=20)
LinkKubelet-48     10.89 ± 1%   8.42 ± 1%  -22.63% (p=0.000 n=20)
LinkDiscovery-48    1.43 ± 1%   1.06 ± 1%  -25.68% (p=0.000 n=20)
LinkIstio-4         4.50 ± 1%   3.52 ± 1%  -21.84% (p=0.000 n=20)
LinkKubelet-4      10.84 ± 2%   8.55 ± 1%  -21.09% (p=0.000 n=20)
LinkDiscovery-4     1.45 ± 2%   1.11 ± 2%  -23.81% (p=0.000 n=20)

                     1.15.6                      1.16
                  max-RSS-bytes  max-RSS-bytes         vs base
LinkIstio-48       1085Mi ± 1%    1006Mi ± 0%    -7.32% (p=0.000 n=20)
LinkKubelet-48     1.60Gi ± 5%    1.46Gi ± 1%    -8.57% (p=0.000 n=20)
LinkDiscovery-48    392Mi ± 1%     362Mi ± 2%    -7.71% (p=0.000 n=20)
LinkIstio-4        1022Mi ± 6%     958Mi ± 1%    -6.26% (p=0.000 n=20)
LinkKubelet-4      1.63Gi ± 2%    1.44Gi ± 0%   -11.44% (p=0.000 n=20)
LinkDiscovery-4     400Mi ± 0%     353Mi ± 1%   -11.83% (p=0.000 n=20)

                     1.15.6                    1.16
                   exe-bytes     exe-bytes           vs base
LinkIstio-48       97.7Mi ± 0%   93.4Mi ± 0%  -4.38% (p=0.000 n=20)
LinkKubelet-48      129Mi ± 0%    127Mi ± 0%  -1.17% (p=0.000 n=20)
LinkDiscovery-48   31.9Mi ± 0%   29.1Mi ± 0%  -8.67% (p=0.000 n=20)
LinkIstio-4        97.7Mi ± 0%   93.4Mi ± 0%  -4.38% (p=0.000 n=20)
LinkKubelet-4       129Mi ± 0%    127Mi ± 0%  -1.17% (p=0.000 n=20)
LinkDiscovery-4    31.9Mi ± 0%   29.1Mi ± 0%  -8.67% (p=0.000 n=20)

https://perf.golang.org/search?q=upload:20201207.6

For #40700.

Change-Id: I3f7b3e08db4fb7980d2472f15e5fc04503e95ea0
Reviewed-on: https://go-review.googlesource.com/c/go/+/275912
Trust: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-12-07 23:44:44 +00:00
Austin Clements
8d34585171 doc/go1.16: announce openbsd/mips64 port
Updates #40995.
For #40700.

Change-Id: I4dced8d70e2f1fa2da98e2eb1a5f1f829f55bb6b
Reviewed-on: https://go-review.googlesource.com/c/go/+/275787
Trust: Austin Clements <austin@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
2020-12-07 17:52:08 +00:00
Alberto Donizetti
7f9a2bc2bc doc/go1.16: fix typo
For #40700

Change-Id: Idea442d45d18ca8cedc0b160df23eac6b86755ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/275677
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-12-07 17:19:41 +00:00
Tobias Klauser
ac0ba6707c doc/go1.16: add missing </a> tag
For #40700

Change-Id: Ic4e16106cbbe18d0c9efffee81c5234ddeedfd32
Reviewed-on: https://go-review.googlesource.com/c/go/+/275674
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
2020-12-07 10:56:21 +00:00
Tobias Klauser
e10c94af26 doc/go1.16: document riscv64 port changes
For #36641
For #40700

Change-Id: Ib268559a2ce7839372dbf273d95876d8d4521a45
Reviewed-on: https://go-review.googlesource.com/c/go/+/274478
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-12-07 02:31:33 +00:00
Filippo Valsorda
4de4480dc3 doc/go1.16: cleanup crypto release notes
For #40700
Fixes #42897

Change-Id: Id3b87841a899818d6939dcc3edbaaa0bc183e913
Reviewed-on: https://go-review.googlesource.com/c/go/+/275313
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2020-12-04 22:08:54 +00:00
Dmitri Shuralyov
edf60be151 doc/go1.16: document no language changes
There are no language changes in Go 1.16, so document that.

For #40700.
Fixes #42976.

Change-Id: I80b0d2ce6cf550c00c0f026ee59ac9fbce6310be
Reviewed-on: https://go-review.googlesource.com/c/go/+/275117
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-04 18:03:43 +00:00
Russ Cox
478bde3a43 io/fs: add Sub
Sub provides a convenient way to refer to a subdirectory
automatically in future operations, like Unix's chdir(2).

The CL also includes updates to fstest to check Sub implementations.

As part of updating fstest, I changed the meaning of TestFS's
expected list to introduce a special case: if you list no expected files,
that means the FS must be empty. In general it's OK not to list all
the expected files, but if you list none, that's almost certainly a
mistake - if your FS were broken and empty, you wouldn't find out.
Making no expected files mean "must be empty" makes the mistake
less likely - if your file system ever worked, then your test will keep
it working.

That change found a testing bug: embedtest was making exactly
that mistake.

Fixes #42322.

Change-Id: I63fd4aa866b30061a0e51ca9a1927e576d6ec41e
Reviewed-on: https://go-review.googlesource.com/c/go/+/274856
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-04 16:49:30 +00:00
Dmitri Shuralyov
7358064508 doc/go1.16: preannounce dropping macOS 10.12 support
Go 1.16 will be the last to support macOS 10.12 Sierra.
Go 1.17 will require macOS 10.13 High Sierra.

For #23011.

Change-Id: I80052bdde4d9f1c5d71b67b85f65fb0b40856750
Reviewed-on: https://go-review.googlesource.com/c/go/+/275299
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-04 15:43:07 +00:00
Alberto Donizetti
b67b7ddabc doc/go1.16: add reflect changes to release notes
For #40700
Fixes #42911

Change-Id: I1bd729f72ae3a29d190ffc34a40c3d0b59ebbbb4
Reviewed-on: https://go-review.googlesource.com/c/go/+/274474
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-04 08:49:16 +00:00
Filippo Valsorda
cc386bd05a doc/go1.16: fix broken <code> tag
For #40700

Change-Id: I0083db494284d6142e1b8b981fca4ac30af2012a
Reviewed-on: https://go-review.googlesource.com/c/go/+/275312
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
2020-12-04 03:10:36 +00:00
Filippo Valsorda
2c2980aa0c doc/go1.16: pre-announce GODEBUG=x509ignoreCN=0 removal in Go 1.17
For #40700
Updates #24151

Change-Id: Id63dcaad238f7534bfce8902b8cb3efd8db5942d
Reviewed-on: https://go-review.googlesource.com/c/go/+/266539
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2020-12-04 00:56:40 +00:00
Austin Clements
4eb7ceba06 doc/go1.16: update runtime and compiler sections
This resolves all TODOs for the runtime and compiler and mentions
several other changes.

For #40700.
Fixes #42892.
Fixes #42894.

Change-Id: I18d14cfe572baf679ecf8b0a4e82c4b866da5a04
Reviewed-on: https://go-review.googlesource.com/c/go/+/275176
Trust: Austin Clements <austin@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2020-12-03 20:42:21 +00:00
Alberto Donizetti
bdc9a837e9 doc/go1.16: add path, path/filepath changes to release notes
For #40700
Fixes #42910

Change-Id: Ie380f5a03930d20dd5001c4cc184cadf2db33de7
Reviewed-on: https://go-review.googlesource.com/c/go/+/274475
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-03 19:25:37 +00:00
Austin Clements
9b0e8a2c95 doc/go1.16: tidy darwin/arm64 port section
For #40700.

Change-Id: I4f5d93e4ed13864f8b7dcc772d7ae074772b5a3f
Reviewed-on: https://go-review.googlesource.com/c/go/+/275175
Trust: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2020-12-03 19:02:05 +00:00
Russ Cox
932733d421 doc/go1.16: document embed, io/fs, runtime/metrics
Fixes #42915.

Change-Id: Ia6e205aaac3cbf4ba7340deafad444ac3e573559
Reviewed-on: https://go-review.googlesource.com/c/go/+/275114
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-03 16:08:40 +00:00
Russ Cox
c519b156fc doc/go1.16: more release notes
Fixes #42899 (flag).
Fixes #42900 (io).
Fixes #42901 (log).
Fixes #42902 (log/syslog).
Fixes #42903 (mime/multipart).
Fixes #42904 (net).
Fixes #42905 (net/http).
Fixes #42906 (net/http/httputil).
Fixes #42907 (net/smtp).
Fixes #42909 (os/signal).
Fixes #42913 (syscall).

Change-Id: Id09f038751d61fe0f1ff57b525e49473dd75c95f
Reviewed-on: https://go-review.googlesource.com/c/go/+/275113
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-03 16:05:27 +00:00
Tobias Klauser
d0c0dc682c doc/go1.16: document os package changes
For #39444
For #40700
Fixes #42908

Change-Id: Idae35adecd79e9d7d207f9d78cb009a980e5c8a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/274477
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2020-12-03 14:53:56 +00:00
KimMachineGun
da54dfb6a1 doc/go1.16: document new behavior of asn1.Unmarshal on invalid argument
For #41509

Change-Id: Ie761c428710d15848cb80ffd2d85de747113f2d4
GitHub-Last-Rev: 0554162459
GitHub-Pull-Request: golang/go#42315
Reviewed-on: https://go-review.googlesource.com/c/go/+/267057
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-03 02:35:36 +00:00
Joe Tsai
78e442ea79 doc/go1.16: add encoding/json note for tag change
For #40700
Fixes #42898

Change-Id: I652657ff8d6cce20bf868f0b1101d723d3f704d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/274614
Trust: Joe Tsai <joetsai@digital-static.net>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-03 01:27:00 +00:00
Roland Shoemaker
f26f227f66 doc/go1.16: add crypto/tls Config.Clone note
For #40700
Fixes #42896

Change-Id: I842c9d60b18abe2ee061c6705a5c7ba62b224d77
Reviewed-on: https://go-review.googlesource.com/c/go/+/274613
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-02 23:27:22 +00:00
Cuong Manh Le
5984ea7197 doc: update signal.Notify example to use buffered channel
This if follow up of CL 274332.

Updates #9399.

Change-Id: Ic6dd534dc18227a799cbb9577979f2285596b825
Reviewed-on: https://go-review.googlesource.com/c/go/+/274393
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-12-02 16:44:10 +00:00
Kevin Burke
283d65413d encoding/json: revert "add "json: " prefix to SyntaxError messages"
This reverts commit 6af088bfc6.

Reason for revert: Broke many tests inside Google which implies many
tests were broken outside of Google as well. The tests may be brittle
but still would require work to change and it's not clear it's worth
the benefit.

Updates #36221
Fixes #42675

Change-Id: Id3a14eb37e7119f5abe50e80dfbf120fdc44db72
Reviewed-on: https://go-review.googlesource.com/c/go/+/273747
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Trust: Joe Tsai <thebrokentoaster@gmail.com>
2020-12-01 22:51:45 +00:00
Alberto Donizetti
4ef78b09c9 doc/go1.16: add runtime/debug changes to release notes
For #40700
Fixes #42912

Change-Id: Ifd36950136db1fc93a8de76a2717a473210418b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/274473
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-01 19:27:22 +00:00
Alberto Donizetti
ae3bfba626 doc/go1.16: add text/template changes to release notes
For #40700
Fixes #42914

Change-Id: I673d86a946c362e28bfbf35fab2c60ebfbd8bda2
Reviewed-on: https://go-review.googlesource.com/c/go/+/274472
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-01 19:26:41 +00:00
Jay Conrod
dd4a52c2a5 doc/go1.16: add multiple release notes for the go command
Added notes for:

* go test -c and -i flags used with unknown flags
* GO111MODULE=on by default
* GOVCS
* Dropped requirements on excluded versions

Removed TODOs for documentation on the retract directive and
'go install pkg@version'. These pages will be written after the beta.

Change-Id: Ic9877a62f908be177a6035a039b72e969e7b7f22
Reviewed-on: https://go-review.googlesource.com/c/go/+/274438
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2020-12-01 18:29:46 +00:00
Roland Shoemaker
f3741bdf7c doc/go1.16: add crypto/x509 note about Verify on Windows
Updates #42897

Change-Id: Ice25922475405aca3cf2cb1c163462f223ede736
Reviewed-on: https://go-review.googlesource.com/c/go/+/274239
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-01 04:13:25 +00:00
Dmitri Shuralyov
4481ad6eb6 doc/go1.16: consolidate stdlib changes in "Minor changes" section
Many of the standard library changes that were added before CL 272871
ended up in the "Core library" section. That section is meant for
major changes like new packages, and most of these aren't.

Consolidate all changes in the "Minor changes to the library" section
for now, so that it's easier to get a complete picture of changes for
each package, along with the remaining TODOs. Add a TODO to read them
over at the end and factor out items that are worth highlighting.

Apply minor other fixups to improve consistency.

For #40700.

Change-Id: I7dc2e7ebf2ea3385fce0c207bae4ce467998a717
Reviewed-on: https://go-review.googlesource.com/c/go/+/273267
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2020-11-25 19:46:00 +00:00
Tobias Klauser
9dc2350d8c doc/go1.16: add time/tzdata release note for CL 261877
For #40700

Change-Id: I056cef20a5f071977d0ae589c7a50d5f69af3283
Reviewed-on: https://go-review.googlesource.com/c/go/+/273166
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-11-25 16:36:14 +00:00
Dmitri Shuralyov
65dcd15c72 doc/go1.16: fill in Go 1.16 release note TODOs using relnote
The additions were generated using golang.org/x/build/cmd/relnote
at CL 272907. It was modified to find previously-missed entries
by querying the Gerrit API in addition to the maintner corpus.

For #40700.
Updates #41849.

Change-Id: If575984fe40e0133ad5e8fc5411ea5063457250d
Reviewed-on: https://go-review.googlesource.com/c/go/+/272871
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2020-11-24 19:53:18 +00:00
Jason A. Donenfeld
f7342596da syscall: add DLLError.Unwrap function
Because we're expecting for future functions to be unavailable, we
should add an Unwrap() function to the DLLError struct, so that people
can test for this situation easily via:

    if errors.Is(err, syscall.ERROR_PROC_NOT_FOUND) { ... }

DLLError already was wrapping the underlying Errno error, but never got
the Go 1.13 helper method.

Fixes golang/go#42584

Change-Id: I0f32a5146946b1b37a30897ba825a56faefc792c
Reviewed-on: https://go-review.googlesource.com/c/go/+/269761
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
2020-11-21 07:37:02 +00:00
Hollow Man
3fd4917472 doc: fix misspelling of “initialization” in diagnostics.html
initilization -> initialization

Change-Id: Ie5edd30559941f2d044280d8d586c2c2692d5b69
GitHub-Last-Rev: 7495a8c722
GitHub-Pull-Request: golang/go#42749
Reviewed-on: https://go-review.googlesource.com/c/go/+/272026
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Ian Lance Taylor <iant@golang.org>
2020-11-20 20:02:47 +00:00
Roland Shoemaker
26a860706a doc/go1.16: add crypto/x509 CSR release note
Change-Id: If74d49c3be9299d8c136003673e0fee2a563389d
Reviewed-on: https://go-review.googlesource.com/c/go/+/268957
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2020-11-11 17:12:34 +00:00
Jay Conrod
8f2db14cd3 cmd/go: release note for -mod=readonly by default
For #40728
Fixes #42466

Change-Id: If2b21b37a590c243828c4fd278ab10b2705450f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/268859
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2020-11-10 18:42:47 +00:00
Cherry Zhang
1948c00b6e doc/go1.16: add release notes for darwin ports
Updates #38485, #42100.
For #40700.

Change-Id: I2caaa8482f13f9b79d4c2d2fdd242543981060cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/267718
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-11-10 18:03:53 +00:00
Roland Shoemaker
9f39a43e0d crypto/tls: de-prioritize AES-GCM ciphers when lacking hardware support
When either the server or client are lacking hardware support for
AES-GCM ciphers, indicated by the server lacking the relevant
instructions and by the client not putting AES-GCM ciphers at the top
of its preference list, reorder the preference list to de-prioritize
AES-GCM based ciphers when they are adjacent to other AEAD ciphers.

Also updates a number of recorded openssl TLS tests which previously
only specified TLS 1.2 cipher preferences (using -cipher), but not
TLS 1.3 cipher preferences (using -ciphersuites), to specify both
preferences, making these tests more predictable.

Fixes #41181.

Change-Id: Ied896c96c095481e755aaff9ff0746fb4cb9568e
Reviewed-on: https://go-review.googlesource.com/c/go/+/262857
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
2020-11-10 01:40:27 +00:00
Cherry Zhang
8badef4cf6 doc/articles/race_detector.html: add darwin/arm64
Updates #38485.

Change-Id: I46f515973c0a31d7c3e0e05ce006121c60c4041e
Reviewed-on: https://go-review.googlesource.com/c/go/+/268497
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-11-09 20:41:26 +00:00
Filippo Valsorda
d7fff1f2cf crypto/tls: ensure the server picked an advertised ALPN protocol
This is a SHALL in RFC 7301, Section 3.2.

Also some more cleanup after NPN, which worked the other way around
(with the possibility that the client could pick a protocol the server
did not suggest).

Change-Id: I83cc43ca1b3c686dfece8315436441c077065d82
Reviewed-on: https://go-review.googlesource.com/c/go/+/239748
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2020-11-09 19:48:28 +00:00
Johan Brandhorst
fdecb5c5b4 crypto/tls: add HandshakeContext method to Conn
Adds the (*tls.Conn).HandshakeContext method. This allows
us to pass the context provided down the call stack to
eventually reach the tls.ClientHelloInfo and
tls.CertificateRequestInfo structs.
These contexts are exposed to the user as read-only via Context()
methods.

This allows users of (*tls.Config).GetCertificate and
(*tls.Config).GetClientCertificate to use the context for
request scoped parameters and cancellation.

Replace uses of (*tls.Conn).Handshake with (*tls.Conn).HandshakeContext
where appropriate, to propagate existing contexts.

Fixes #32406

Change-Id: I33c228904fe82dcf57683b63627497d3eb841ff2
Reviewed-on: https://go-review.googlesource.com/c/go/+/246338
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-11-09 18:34:47 +00:00
Jay Conrod
8a368c63ec cmd/go: print deprecation messages for -i
build, install, and test will now print deprecation messages when the
-i flag is used. clean will continue to support -i.

For #41696

Change-Id: I956c235c487a872c5e6c1395388b4d6cd5ef817a
Reviewed-on: https://go-review.googlesource.com/c/go/+/266368
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-11-09 18:32:40 +00:00
Jay Conrod
65607683f5 cmd/go: print deprecation messages for 'go get' installing executables
For #40276

Change-Id: I5e631a4c9ce07f23640fb56eb455457bc55072c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/266360
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-11-09 18:32:36 +00:00
Katie Hockman
c9b9cd73bb crypto/tls: set Deadline before sending close notify alert
This change also documents the need to set a Deadline before
calling Read or Write.

Fixes #31224

Change-Id: I89d6fe3ecb0a0076b4c61765f61c88056f951406
Reviewed-on: https://go-review.googlesource.com/c/go/+/266037
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-11-07 02:12:20 +00:00
Bryan C. Mills
06538fa723 cmd/go/internal/modget: resolve paths at the requested versions
Previously, we resolved each argument to 'go get' to a package path or
module path based on what was in the build list at existing versions,
even if the argument specified a different version explicitly. That
resulted in bugs like #37438, in which we variously resolved the wrong
version or guessed the wrong argument type for what is unambiguously a
package argument at the requested version.

We were also using a two-step upgrade/downgrade algorithm, which could
not only upgrade more that is strictly necessary, but could also
unintentionally upgrade *above* the requested versions during the
downgrade step.

This change instead uses an iterative approach, with an explicit
disambiguation step for the (rare) cases where an argument could match
the same package path in multiple modules. We use a hook in the
package loader to halt package loading as soon as an incorrect version
is found — preventing over-resolving — and verify that the result
after applying downgrades successfully obtained the requested versions
of all modules.

Making 'go get' be correct and usable is especially important now that
we are defaulting to read-only mode (#40728), for which we are
recommending 'go get' more heavily.

While I'm in here refactoring, I'm also reworking the API boundary
between the modget and modload packages. Previously, the modget
package edited the build list directly, and the modload package
accepted the edited build list without validation. For lazy loading
(#36460), the modload package will need to maintain additional
metadata about the requirement graph, so it needs tighter control over
the changes to the build list.

As of this change, modget no longer invokes MVS directly, but instead
goes through the modload package. The resulting API gives clearer
reasons in case of updates, which we can use to emit more useful
errors.

Fixes #37438
Updates #36460
Updates #40728

Change-Id: I596f0020f3795870dec258147e6fc26a3292c93a
Reviewed-on: https://go-review.googlesource.com/c/go/+/263267
Trust: Bryan C. Mills <bcmills@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2020-11-05 17:52:17 +00:00
Johan Knutzen
1e3b535b6e syscall: expose bInheritHandles of CreateProcess
Certain use cases require this parameter to be false. This includes
spawning a child process in a different windows session than session 0.

Docs regarding the behavior of this parameter to CreateProcess:
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa

Fixes #42098

Change-Id: If998f57d6f2962824aacbee75e1b508b255ab293
GitHub-Last-Rev: 584eb13e36
GitHub-Pull-Request: golang/go#41957
Reviewed-on: https://go-review.googlesource.com/c/go/+/261917
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
2020-11-05 02:28:14 +00:00
Austin Clements
4fcb5068f6 doc/go1.16: document switch to MADV_DONTNEED
Updates #42330.

Change-Id: Ifda10a5c3dca30acf1258e9e0af202e9beffc68e
Reviewed-on: https://go-review.googlesource.com/c/go/+/267137
Trust: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2020-11-02 21:08:14 +00:00
Robert Griesemer
2b9b2720b8 spec: split shift examples into groups for 32- and 64-bit ints
In the current (pre-CL) version of the spec, the 2nd last shift
example appears to be using the array declared in the last example.
On a 32-bit platform, that array would have length 0, which would
lead to a panic in the 2nd last example. Also, if this code were
inside a function, it wouldn't compile (array declared after use).

Use an explicitly declared array for that specific shift example.
Also, split out all cases that produce different results for 32-
vs 64-bit ints.

Fixes #41835.

Change-Id: Ie45114224509e4999197226f91f7f6f934449abb
Reviewed-on: https://go-review.googlesource.com/c/go/+/260398
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-10-30 16:20:05 +00:00
Ian Lance Taylor
87d59bcdc3 doc: mention Trust+1 in contribution guide
For #40699

Change-Id: If753a073488880433ae3319dcf2a2dfaa887fd0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/259737
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2020-10-28 19:28:08 +00:00
Cuong Manh Le
642329fdd5 Revert "cmd/compile: split exported/non-exported methods for interface type"
This reverts commit 8f26b57f9a.

Reason for revert: break a bunch of code, include standard library.

Fixes #42123

Change-Id: Ife90ecbafd2cb395623d1db555fbfc9c1b0098e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/264026
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2020-10-28 17:10:08 +00:00
Daniel Martí
9113d8c37f doc/go1.16: document BuildID in 'go list -export'
This corresponds to the feature in https://golang.org/cl/263542, since
this can be a noteworthy change to people writing tools to inspect Go
builds.

Also amend the wording to clarify that build IDs are for an entire
compiled package, not just their export data or object file.

Change-Id: I2eb295492807d5d2997a35e5e2371914cb3ad3a0
Reviewed-on: https://go-review.googlesource.com/c/go/+/264158
Trust: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-10-27 20:22:56 +00:00
qmuntal
f1aa0b081e doc/go1.16: document ASLR support for -buildmode=c-shared on windows
Change-Id: I89c61e444b3ab36f0081a5252d210cb265344122
Reviewed-on: https://go-review.googlesource.com/c/go/+/264157
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
2020-10-22 23:00:42 +00:00
Daniel Martí
de74ea5d74 cmd/go: set TOOLEXEC_IMPORTPATH for -toolexec tools
This way, a -toolexec tool can tell precisely what package is being
built when it's run. This was very hard to do before, because the tool
had to piece together that information given the build action's
arguments or flags.

Since there wasn't a good set of tests for -toolexec, add one in the
form of a test script. It builds a simple set of packages with a variety
of build tools, to ensure that all the cases behave as expected.

Like other recent master changes, include the changelog item for this
user-facing change too.

Fixes #15677.

Change-Id: I0a5a1d9485840323ec138b2e64b7e7dd803fdf90
Reviewed-on: https://go-review.googlesource.com/c/go/+/263357
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Trust: Daniel Martí <mvdan@mvdan.cc>
2020-10-22 15:10:01 +00:00
Ian Lance Taylor
cb768c801a encoding/xml: fix reserved namespace check to be case-insensitive
Fixes the check for the reserved namespace prefix
"xml" to be case insensitive, so as to match all variants of:

    (('X'|'x')('M'|'m')('L'|'l'))

as mandated by Section 2.3 of https://www.w3.org/TR/REC-xml/

This is a roll forward of CL 203417, which was rolled back by CL 240179.
We've decided that the roll back was incorrect, and any broken tests
should be fixed.

The original CL 203417 was by Tamás Gulácsi.

Fixes #35151
For #39876

Change-Id: I2e6daa7aeb252531fba0b8a56086613e13059528
Reviewed-on: https://go-review.googlesource.com/c/go/+/264024
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-10-21 23:51:30 +00:00
Kevin Burke
6af088bfc6 encoding/json: add "json: " prefix to SyntaxError messages
The other named errors - UnmarshalTypeError, etc - in this package do
the same, so we should prepend the package prefix to error messages
for consistency.

Add a note to the release docs in case this is interpreted as
a breaking change.

Fixes #36221.

Change-Id: Ie24b532bbf9812e108c259fa377e2a6b64319ed4
Reviewed-on: https://go-review.googlesource.com/c/go/+/263619
Run-TryBot: Kevin Burke <kev@inburke.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Kevin Burke <kev@inburke.com>
Trust: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
2020-10-21 18:50:01 +00:00
Cuong Manh Le
62f18d07ba doc/go1.16: document net TCP listener's backlog size update
Updates #41470

Change-Id: Iebd3a339504aa7f8834853d6a740557fb3bce3ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/262938
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-10-21 00:59:25 +00:00
Katie Hockman
2a206c7fcc crypto/hmac: panic if reusing hash.Hash values
Also put Reset in the correct place for the other
benchmarks.

name           old time/op    new time/op    delta
NewWriteSum-8    1.01µs ± 0%    1.01µs ± 1%   ~     (p=0.945 n=9+9)

name           old speed      new speed      delta
NewWriteSum-8  31.7MB/s ± 0%  31.6MB/s ± 1%   ~     (p=0.948 n=9+9)

name           old alloc/op   new alloc/op   delta
NewWriteSum-8      544B ± 0%      544B ± 0%   ~     (all equal)

name           old allocs/op  new allocs/op  delta
NewWriteSum-8      7.00 ± 0%      7.00 ± 0%   ~     (all equal)

Fixes #41089

Change-Id: I3dae660adbe4993963130bf3c2636bd53899164b
Reviewed-on: https://go-review.googlesource.com/c/go/+/261960
Trust: Katie Hockman <katie@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
2020-10-19 15:00:02 +00:00
Nigel Tao
a2eb53c571 strconv: use the Eisel-Lemire ParseFloat algorithm
Also fix BenchmarkAtof64Random* to initialize the test data when none
of the TestAtof* tests are run.

Passing "go test -test.count=5 -test.run=xxx -test.bench=Atof64" on to
benchstat:

name                  old time/op  new time/op  delta
Atof64Decimal-4       47.9ns ± 0%  48.3ns ± 1%     ~     (p=0.238 n=4+5)
Atof64Float-4         58.3ns ± 3%  57.7ns ± 0%     ~     (p=0.151 n=5+5)
Atof64FloatExp-4       107ns ± 0%    71ns ± 1%  -33.89%  (p=0.016 n=4+5)
Atof64Big-4            163ns ± 0%   166ns ± 2%     ~     (p=0.159 n=4+5)
Atof64RandomBits-4     299ns ± 1%   166ns ± 1%  -44.41%  (p=0.008 n=5+5)
Atof64RandomFloats-4   188ns ± 1%   144ns ± 0%  -23.03%  (p=0.008 n=5+5)

The canada.json file from github.com/miloyip/nativejson-benchmark is
full of geospatial coordinates (i.e. numbers). With this program:

    src, _ := ioutil.ReadFile("canada.json")
    for i := 0; i < 5; i++ {
        now := time.Now()
        for j := 0; j < 10; j++ {
            dst := interface{}(nil)
            if err := json.Unmarshal(src, &dst); err != nil {
                log.Fatal(err)
            }
        }
        fmt.Println(time.Since(now))
    }

Median of the 5 printed numbers, lower is better.
Before: 760.819549ms
After:  702.651646ms
Ratio:  1.08x

The new detailedPowersOfTen table weighs in at 596 * 16 = 9536 bytes,
but some of that weight gain can be clawed back, in a follow-up commit,
that folds in the existing powersOfTen table in extfloat.go.

RELNOTE=yes

Change-Id: I3953110deaa1f5f6941e88e8417c4665b649ed80
Reviewed-on: https://go-review.googlesource.com/c/go/+/260858
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Nigel Tao <nigeltao@golang.org>
2020-10-17 00:26:52 +00:00
Roland Shoemaker
2ec71e5732 crypto/x509: add signature verification to CreateCertificate
This changes checks the signature generated during CreateCertificate
and returns an error if the verification fails. A benchmark is also
added. For RSA keys the delta looks to be insignificant, but for
ECDSA keys it introduces a much larger delta which is not ideal.

name          old time/op  new time/op   delta
RSA_2048-8    1.38ms ± 6%   1.41ms ± 2%      ~     (p=0.182 n=10)
ECDSA_P256-8  42.6µs ± 4%  116.8µs ± 4%  +174.00%  (p=0.000 n=1

Fixes #40458

Change-Id: I22827795bb9bb6868b4fa47391927db1d3bc19a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/259697
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Trust: Emmanuel Odeke <emm.odeke@gmail.com>
Trust: Roland Shoemaker <roland@golang.org>
2020-10-14 20:17:49 +00:00
Martin Möhrmann
7c58ef732e runtime: implement GODEBUG=inittrace=1 support
Setting inittrace=1 causes the runtime to emit a single line to standard error for
each package with init work, summarizing the execution time and memory allocation.

The emitted debug information for init functions can be used to find bottlenecks
or regressions in Go startup performance.

Packages with no init function work (user defined or compiler generated) are omitted.

Tracing plugin inits is not supported as they can execute concurrently. This would
make the implementation of tracing more complex while adding support for a very rare
use case. Plugin inits can be traced separately by testing a main package importing
the plugins package imports explicitly.

$ GODEBUG=inittrace=1 go test
init internal/bytealg @0.008 ms, 0 ms clock, 0 bytes, 0 allocs
init runtime @0.059 ms, 0.026 ms clock, 0 bytes, 0 allocs
init math @0.19 ms, 0.001 ms clock, 0 bytes, 0 allocs
init errors @0.22 ms, 0.004 ms clock, 0 bytes, 0 allocs
init strconv @0.24 ms, 0.002 ms clock, 32 bytes, 2 allocs
init sync @0.28 ms, 0.003 ms clock, 16 bytes, 1 allocs
init unicode @0.44 ms, 0.11 ms clock, 23328 bytes, 24 allocs
...

Inspired by stapelberg@google.com who instrumented doInit
in a prototype to measure init times with GDB.

Fixes #41378

Change-Id: Ic37c6a0cfc95488de9e737f5e346b8dbb39174e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/254659
Trust: Martin Möhrmann <moehrmann@google.com>
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2020-10-14 05:34:32 +00:00
Keith Randall
2be7788f83 doc: update install docs for 387->softfloat transition
Fixes #41861

Change-Id: I7aa9370c7762986ee07ba6ff7f6ebda067559f06
Reviewed-on: https://go-review.googlesource.com/c/go/+/260757
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-10-09 02:49:19 +00:00
Cuong Manh Le
8f26b57f9a cmd/compile: split exported/non-exported methods for interface type
Currently, mhdr/methods is emitted with the same len/cap. There's no way
to distinguish between exported and non-exported methods statically.

This CL splits mhdr/methods into two parts, use "len" for number of
exported methods, and "cap" for all methods. This fixes the bug in
issue #22075, which intends to return the number of exported methods but
currently return all methods.

Note that with this encoding, we still can access either
all/exported-only/non-exported-only methods:

	mhdr[:cap(mhdr)]          // all methods
	mhdr                      // exported methods
	mhdr[len(mhdr):cap(mhdr)] // non-exported methods

Thank to Matthew Dempsky (@mdempsky) for suggesting this encoding.

Fixes #22075

Change-Id: If662adb03ccff27407d55a5578a0ed05a15e7cdd
Reviewed-on: https://go-review.googlesource.com/c/go/+/259237
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2020-10-09 02:14:32 +00:00
Roberto Clapis
542693e005 net/http: make SameSiteDefaultMode behavior match the specification
The current specification does not foresee a SameSite attribute without
a value. While the existing implementation would serialize SameSite in a
way that would likely be ignored by well-impelemented clients, it is
better to not rely on this kind of quirks.

Specification: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-05#section-4.1.1

Fixes #36990

Change-Id: Ie51152741d7e84bab64d3e4e4f780286932acbde
Reviewed-on: https://go-review.googlesource.com/c/go/+/256498
Trust: Roberto Clapis <roberto@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-10-08 08:53:13 +00:00
Dmitri Shuralyov
470829d474 doc/go1.16: document GO386=387 and GO386=softfloat
Also add a few more TODOs as found by the relnote command.
It's an incomplete list due to #41849.

For #40700.

Change-Id: Id17a9be86d3338e1fcb281d26e7298ff26e92864
Reviewed-on: https://go-review.googlesource.com/c/go/+/260337
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2020-10-07 19:50:44 +00:00
witchard
1fb149fd64 cmd/go/internal/get: improve -insecure deprecation docs
Updates #37519

Change-Id: I212607f1839b729d7da24b1258e56997b13ad830
GitHub-Last-Rev: db6d3c835b
GitHub-Pull-Request: golang/go#41613
Reviewed-on: https://go-review.googlesource.com/c/go/+/257157
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2020-10-06 19:39:32 +00:00
Alberto Donizetti
8e203884dc doc: fix typo in contribute.html
Change-Id: Ica27c4a9e4c364d94250aebfc4c2b59cff7f4a8f
Reviewed-on: https://go-review.googlesource.com/c/go/+/258679
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2020-10-06 07:37:55 +00:00
Tobias Klauser
21eb3dcf93 doc/go1.16: announce netbsd/arm64 support
netbsd/arm64 now complies with all the requirements for a port as
specified on https://golang.org/wiki/PortingPolicy

Note that this was preliminarily announced in the Go 1.13 release notes
(CL 183637) but then removed again due to the port lacking a builder at
that time (CL 192997).

Updates #30824

Change-Id: I2f40fabc84fe9cb699282e6a9d13ed9b64478e36
Reviewed-on: https://go-review.googlesource.com/c/go/+/259277
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-10-02 20:23:33 +00:00
Filippo Valsorda
8f1c99035d crypto/dsa,crypto/x509: deprecate DSA and remove crypto/x509 support
Updates #40337

Change-Id: I5c1218df3ae7e13144a1d9f7d4a4b456e4475c0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/257939
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2020-10-02 10:48:33 +00:00
Roland Shoemaker
2ca2e94731 doc/go1.16: fix crypto typo
Change-Id: Icf962098cc22f16b0acf75db1e82eaddb9fa0c80
Reviewed-on: https://go-review.googlesource.com/c/go/+/258777
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-10-01 15:04:29 +00:00
Roland Shoemaker
1eeaff75f9 crypto/x509: enforce SAN IA5String encoding restrictions
Extends the IA5String encoding restrictions that are currently applied
to name constraints to dNSName, rfc822Name, and
uniformResourceIdentifier elements of the SAN. The utility function
isIA5String is updated to use unicode.MaxASCII rather than utf8.RuneSelf
as it is somewhat more readable.

Certificates that include these badly encoded names do exist, but are
exceedingly rare. zlint and other linters enforce this encoding and
searching censys.io reveals only three currently trusted certificates
with this particular encoding issue.

Fixes #26362

Change-Id: I7a4f3e165a1754e5b4bfaeabc03e01eb7367f3c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/235078
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2020-09-30 17:51:05 +00:00
Ainar Garipov
72a9dec156 doc/go1.16: document net.ErrClosed usage in crypto/tls
Change-Id: I130cf79b93c6456dbe87f0042209e204c4e319b2
Reviewed-on: https://go-review.googlesource.com/c/go/+/257457
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Trust: Emmanuel Odeke <emm.odeke@gmail.com>
2020-09-27 06:23:18 +00:00
Robert Griesemer
23cc16cdd2 spec: better variable name for operator example
Suggested by @yaxinlx.

Fixes #41612.

Change-Id: I98b9968a95d090ee3c67ff02678e1874e6d98c33
Reviewed-on: https://go-review.googlesource.com/c/go/+/257159
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-09-24 20:41:14 +00:00
witchard
9e073b504f doc/go1.16: add -insecure deprecation to release notes
Updates #37519.

Change-Id: Iddf88a24334d4740f9c40caa2354127298692eeb
GitHub-Last-Rev: deda4c858b
GitHub-Pull-Request: golang/go#41545
Reviewed-on: https://go-review.googlesource.com/c/go/+/256419
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
2020-09-24 13:29:01 +00:00
Cherry Zhang
a413908dd0 all: add GOOS=ios
Introduce GOOS=ios for iOS systems. GOOS=ios matches "darwin"
build tag, like GOOS=android matches "linux" and GOOS=illumos
matches "solaris". Only ios/arm64 is supported (ios/amd64 is
not).

GOOS=ios and GOOS=darwin remain essentially the same at this
point. They will diverge at later time, to differentiate macOS
and iOS.

Uses of GOOS=="darwin" are changed to (GOOS=="darwin" || GOOS=="ios"),
except if it clearly means macOS (e.g. GOOS=="darwin" && GOARCH=="amd64"),
it remains GOOS=="darwin".

Updates #38485.

Change-Id: I4faacdc1008f42434599efb3c3ad90763a83b67c
Reviewed-on: https://go-review.googlesource.com/c/go/+/254740
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2020-09-23 18:12:59 +00:00
Katie Hockman
bc320fc1f5 doc: update overview for authentication
The instructions have already been updated in greater
detail in "Step 2: Configure git authentication", but
the overview needs updated to reflect the new workflow.

Change-Id: I6f411a3dc500a9058036a4a828403c0153e4220a
Reviewed-on: https://go-review.googlesource.com/c/go/+/256857
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2020-09-23 17:10:35 +00:00
Bryan C. Mills
3aa09489ab cmd/go: add a '-e' flag to 'mod tidy' and 'mod vendor'
This flag, like the -e flag to 'go list', instructs the command to
make a best effort to continue in spite of errors for specific packages.

Fixes #26603

Change-Id: I5ee2f50c71870ae8ef3f9b3e5b045474adcca525
Reviewed-on: https://go-review.googlesource.com/c/go/+/255960
Trust: Bryan C. Mills <bcmills@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2020-09-22 17:04:13 +00:00
Bryan C. Mills
4e1d812afc doc/go1.16: add subheads and adjust formatting in the 'Go command' section
Change-Id: I5f70684d4033d8b11e1cce89268d8222ed596c67
Reviewed-on: https://go-review.googlesource.com/c/go/+/256400
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2020-09-22 16:52:11 +00:00
Ian Lance Taylor
eaa97fbf20 cmd/cgo: don't translate bitfields into Go fields
The cgo tool would sometimes emit a bitfield at an offset that did not
correspond to the C offset, such as for the example in the new test.

Change-Id: I61b2ca10ee44a42f81c13ed12865f2060168fed5
Reviewed-on: https://go-review.googlesource.com/c/go/+/252378
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
2020-09-16 03:02:13 +00:00
Jay Conrod
e306363612 cmd/go: implement 'go install pkg@version'
With this change, 'go install' will install executables in module mode
without using or modifying the module in the current directory, if
there is one.

For #40276

Change-Id: I922e71719b3a4e0c779ce7a30429355fc29930bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/254365
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2020-09-15 12:45:59 +00:00
Bryan C. Mills
d27ebc7b86 cmd/go/internal/modload: implement the "all" pattern for lazy loading
The new semantics of the "all" package pattern can be implemented
without actually changing module loading per se. This change
implements those semantics, so that the change can be decoupled from
the changes to the module requirement graph.

For #36460

Change-Id: I0ee8b17afa8b728dc470a42a540fcc01764a4442
Reviewed-on: https://go-review.googlesource.com/c/go/+/240623
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
2020-09-09 22:37:22 +00:00
Ainar Garipov
c489330987 doc/go1.16: reformat the minor changes section as a definition list
Change the section to use <dl>, <dt>, and <dd> tags to match
previous documents.

Change-Id: Ide0bea698a84ed6b61b364ef9e2f3801ebb8d4d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/250897
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-09-05 18:40:02 +00:00
Emmanuel T Odeke
ef20f76b8b net/http: reject negative suffix-length Range:bytes=--N with 416 status code
Fixes the file server to reject requests of the form:
    "Range": "bytes=--N"
where "-N" is a negative suffix-length as designated by the
grammar in RFC 7233 Section 2.1, "Byte-Ranges", which specifies
that suffix-length MUST be of the form 1*DIGIT aka a non-negative digit.

Thus requests such as:
    "Range": "bytes=--2"
will be rejected with a "416 Range Not Satisfiable" response.

Fixes #40940

Change-Id: I3e89f8326c14af30d8bdb126998a50e02ba002d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/252497
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-09-02 21:50:41 +00:00
Egon Elbre
d7a6a44deb doc/asm: add BP is callee-save paragraph
Change-Id: Id38e639c66a42acf0b1c4488cdfd0b7b6cf71c78
Reviewed-on: https://go-review.googlesource.com/c/go/+/250397
Reviewed-by: Keith Randall <khr@golang.org>
2020-09-01 14:54:08 +00:00
Ariel Mashraki
c8ea03828b text/template: add CommentNode to template parse tree
Fixes #34652

Change-Id: Icf6e3eda593fed826736f34f95a9d66f5450cc98
Reviewed-on: https://go-review.googlesource.com/c/go/+/229398
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-08-28 21:45:12 +00:00
Santiago De la Cruz
3b6c812f3d doc: add linux/riscv64 valid combination
Mention valid combination GOOS=linux and GOARCH=riscv64
in the "Installing Go from source" document.

Updates #27532

Change-Id: I8c1406087132f5c82a2eee5dbcda95d53c64d263
GitHub-Last-Rev: ee74ff9517
GitHub-Pull-Request: golang/go#41063
Reviewed-on: https://go-review.googlesource.com/c/go/+/250997
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2020-08-28 08:12:25 +00:00
Ian Lance Taylor
4f76fe8675 cmd/go, testing, os: fail test that calls os.Exit(0)
This catches cases where a test calls code that calls os.Exit(0),
thereby skipping all subsequent tests.

Fixes #29062

Change-Id: If9478972f40189e27623557e7141469ca4234d89
Reviewed-on: https://go-review.googlesource.com/c/go/+/250977
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-08-27 23:19:15 +00:00
ShihCheng Tu
47b4509977 doc/go1.14: document json.Umarshal map key support of TextUnmarshaler
Document that json.Unmarshal supports map keys whose underlying
types implement encoding.TextUnmarshaler.

Fixes #38801

Change-Id: Icb9414e9067517531ba0da910bd4a2bb3daace65
Reviewed-on: https://go-review.googlesource.com/c/go/+/237857
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-08-27 09:47:26 +00:00
Ian Lance Taylor
e9ad52e46d net: export ErrClosed
This permits programs to reliably detect whether they are using a
closed network connection.

Fixes #4373

Change-Id: Ib4ce8cc82bbb134c4689f0ebc8b9b11bb8b32a22
Reviewed-on: https://go-review.googlesource.com/c/go/+/250357
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2020-08-26 22:48:00 +00:00
Jay Conrod
008048c5f4 doc: add module retraction to release notes
For #24031

Change-Id: I9bd0905e9aacee4bec3463b7d91f6f0929744752
Reviewed-on: https://go-review.googlesource.com/c/go/+/228384
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-08-26 21:17:33 +00:00
Andrew Gerrand
bb54a855a9 net/http: handle Request.URL.RawPath in StripPrefix
The StripPrefix wrapper strips a prefix string from the request's
URL.Path field, but doesn't touch the RawPath field. This leads to the
confusing situation when StripPrefix handles a request with URL.RawPath
populated (due to some escaped characters in the request path) and the
wrapped request's RawPath contains the prefix but Path does not.

This change modifies StripPrefix to strip the prefix from both Path and
RawPath. If there are escaped characters in the prefix part of the
request URL the stripped handler serves a 404 instead of invoking the
underlying handler with a mismatched Path/RawPath pair.

This is a backward incompatible change for a very small minority of
requests; I would be surprised if anyone is depending on this behavior,
but it is possible. If that's the case, we could make a more
conservative change where the RawPath is trimmed if possible, but when
the prefix contains escaped characters then we don't 404 but rather send
through the invalid Path/RawPath pair as before.

Fixes #24366

Change-Id: I7030b8c183a3dfce307bc0272bba9a18df4cfe08
Reviewed-on: https://go-review.googlesource.com/c/go/+/233637
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2020-08-25 06:01:11 +00:00
Marcel van Lohuizen
8ec5a052ec unicode: upgrade to Unicode 13.0.0
Fixes #40755

Change-Id: I14b3977317994095db8ae1bd873c174641209356
Reviewed-on: https://go-review.googlesource.com/c/go/+/248765
Run-TryBot: Marcel van Lohuizen <mpvl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-08-20 13:41:13 +00:00
Polina Osadcha
6f99b33c18 all: replace Replace(..., -1) with ReplaceAll(...)
Change-Id: I8f7cff7a83a9c50bfa3331e8b40e4a6c2e1c0eee
Reviewed-on: https://go-review.googlesource.com/c/go/+/245198
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2020-08-17 04:07:23 +00:00