Commit graph

4002 commits

Author SHA1 Message Date
Michael Pratt
d0c3b01162 doc/go1.18: drop misplaced period
Change-Id: Id29f352c8d2e61672f55294120058b1f585f7aeb
Reviewed-on: https://go-review.googlesource.com/c/go/+/387655
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-23 18:00:06 +00:00
Cherry Mui
3140625606 doc/go1.18: correct "go build -asan" HTML tag
The tag was "go-mod-vendor", which doesn't match the content.

Also move that section later, so "go mod" sections stay together.

For #47694.

Change-Id: Id4fa7ee0768682a9aadfeb1b2f1d723e7521896b
Reviewed-on: https://go-review.googlesource.com/c/go/+/387354
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-22 18:06:06 +00:00
Alberto Donizetti
c9fe126c8b doc/go1.18: fix a few small typos, add a few commas
Updates #47694

Change-Id: I6c1c3698fdd55fe83c756f28776d1d26dba0a9df
Reviewed-on: https://go-review.googlesource.com/c/go/+/386974
Trust: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-21 21:28:40 +00:00
Nick Sherron
903e7cc699 doc/go1.18: fix grammar error
sed 's/the/that/g'

Change-Id: I3f539817b055d54b0ec99346555ac91b756d9ed6
GitHub-Last-Rev: 2e7df1c346
GitHub-Pull-Request: golang/go#51267
Reviewed-on: https://go-review.googlesource.com/c/go/+/386854
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2022-02-19 00:03:22 +00:00
Russ Cox
61b5c866a9 doc/go1.18: document Go 1.17 bootstrap and //go:build fix
For #44505 and #41184.

Change-Id: I9503292dace1aa60de167ca5807bf131554465b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/386774
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2022-02-18 20:32:59 +00:00
Michael Matloob
5d8d387849 cmd/go: set go.work path using GOWORK, and remove -workfile flag
This change removes the -workfile flag and allows the go.work file path
to be set using GOWORK (which was previously read-only). This removes
the potential discrepancy and confusion between the flag and environment
variable.

GOWORK will still return the actual path of the go.work file found if it
is set to '' or 'auto'. GOWORK will return 'off' if it is set to 'off'.

For #45713
Fixes #51171

Change-Id: I72eed65d47c63c81433f2b54158d514daeaa1ab3
Reviewed-on: https://go-review.googlesource.com/c/go/+/385995
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-02-16 15:58:47 +00:00
Jeremy Faller
b2cb1bd0f5 doc/go1.18: remove ppc regabi TODO as it's in the compiler section
Updates #47694

Change-Id: I55175988f193fb573339933e9ff0d4c49734b444
Reviewed-on: https://go-review.googlesource.com/c/go/+/385658
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2022-02-14 19:37:40 +00:00
Robert Griesemer
badbc52d82 spec: highlight missing prose for easier review, fixed a few sections
The (temporary) highlights will make it easier to review the spec
in formatted form as opposed to html text.

Added a missing rule about the use of adjusted core types for
constraint type inference.

Adjusted rule for invalid embedding of interface types.

Change-Id: Ie573068d2307b66c937e803c486724175415b9c6
Reviewed-on: https://go-review.googlesource.com/c/go/+/385535
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-14 05:18:03 +00:00
Robert Griesemer
18e1a5a085 spec: combine section on type parameters and type parameter lists
This change moves the relevant prose of the section on type parameters
into the section on type parameter lists and eliminates the former.

With this change, the section on types now exclusively describes all
Go composite types.

User-defined named types (defined types and type parameters) are
described with their declarations.

Change-Id: I3e421cd236e8801d31a4a81ff1e5ec9933e3ed20
Reviewed-on: https://go-review.googlesource.com/c/go/+/385037
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-11 16:26:49 +00:00
Robert Griesemer
ea9b1f1573 spec: add a section on implementing an interface
Also, fixed several closing header tags and removed a duplicate "the".
(Thanks to @hopehook and Hossein Zolfi for pointing these out.)

Change-Id: I85a40ba44b8570a578bce8d211dcc5ea3901fb1e
Reviewed-on: https://go-review.googlesource.com/c/go/+/385036
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-11 16:26:45 +00:00
Robert Griesemer
e50f0f372b spec: describe processing of function arguments for type inference more precisely
The outcome of type inference depends critically on when function
argument type inference stops processing arguments. Describe this
and explain an example with some detail.

Also: In the section on the built-in function delete, refer to the
value rather than the type of the second argument, as it may be an
untyped constant.

Change-Id: Ice7fbb33f985afe082380b8d37eaf763238a3818
Reviewed-on: https://go-review.googlesource.com/c/go/+/385034
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-11 05:11:58 +00:00
Kevin Burke
9fdcfb7c10 doc: fix spelling error in link ID
Change-Id: I6de236442f213ab4b4f19ec881add4923d8bfd8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/385054
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Kevin Burke <kevin@burke.dev>
2022-02-11 04:50:35 +00:00
Robert Griesemer
30501bbef9 spec: introduce notion of basic interface, misc. fine-tuning
A basic interface is a classical Go interface containing only
methods or embedding basic interfaces.

Use this to simplify rule about what interfaces may be used
where. The term "basic interface" will also be useful when
talking about various interfaces in general.

Fix rule restricting union terms: as it was written it also
excluded interface terms with non-empty method sets due to
embedded non-interface types with methods.

Split the large section on interfaces into three smaller
pieces by introducing section titles.

Change-Id: I142a4d5609eb48aaa0f7800b5b85c1d6c0703fcb
Reviewed-on: https://go-review.googlesource.com/c/go/+/384994
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-11 00:30:56 +00:00
Robert Griesemer
ca3fae1e0e spec: use the term "generic" rather than "(type-)parameterized"
This makes the prose easier to read while being just as precise.

Change-Id: Ie46c6c5042f419de9fdeb1c75bb72b5a40c37073
Reviewed-on: https://go-review.googlesource.com/c/go/+/384774
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-11 00:26:29 +00:00
Robert Griesemer
11788aa6e0 spec: adjust rules to use core or specific types as necessary
Change-Id: I64280c1bb9608d7781514f237ac70c6abbfde9f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/384754
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-11 00:26:18 +00:00
Robert Griesemer
99b61be9f5 spec: move all sections describing type properties into one place
This change only shuffles sections for better organization; there
are no other changes except title and link adjustments.

Until now, the sections on underlying types and method sets were
immediately following the introduction of types. As it becomes
necessary to introduce the notion of a core type more centrally,
the natural place is immediately following the section on underlying
types. All together, these sections, immediately after the introduction
of types, would distract from purpose of the section on types, which
is to introduce the various types that Go offers.

The more natural place for the definition of underlying, core, and
specific types is the section on properties of types and values.

To accomplish this, the section on the structure of interfaces is
split into a section on core types and one on specific types, and
the various sections are reorganized appropriately.

The new organization of the section on types now simply introduces
all Go types as follows:

- boolean types
- numeric types
- string types
- array types
- slice types
- struct types
- pointer types
- function types
- interface types
- map types
- channel types
- type parameters

The new organization of the section on properties of types and values
is as follows:

- underlying types
- core types
- specific types
- type identity
- assignability
- representability
- method sets

Change-Id: I59e4d47571da9d4c89d47d777f5353fb1c5843e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/384623
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-10 21:40:49 +00:00
Robert Griesemer
3b8c716e0f spec: document numeric operations behavior for generic types
Includes a few minor cosmetic changes.

Change-Id: I6c307d958b47d83671142688630ea7835168439f
Reviewed-on: https://go-review.googlesource.com/c/go/+/384622
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-10 21:40:12 +00:00
Carlos Amedee
656d3f4401 doc/go1.18: remove some TODOs for changes we aren't mentioning again
These TODOs were originally removed in CL 368794.

Updates #47694

Change-Id: I39d5c0ce5f96adbbc466585a5831f721057dbed5
Reviewed-on: https://go-review.googlesource.com/c/go/+/384619
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-10 01:08:52 +00:00
Robert Griesemer
9867262dfd spec: document behavior of generic type switch cases
Fixes #51110.

Change-Id: I11370417f1ef435b05dfab18eeabc2c3c1b7b8a1
Reviewed-on: https://go-review.googlesource.com/c/go/+/384674
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-09 21:51:54 +00:00
Robert Griesemer
20c300bc70 spec: the type of a constant cannot be a type parameter
Add corresponding rules and a couple of examples.

Fixes #50202.

Change-Id: I4287b5e2d0fd29a0c871795e07f1bb529c9c6004
Reviewed-on: https://go-review.googlesource.com/c/go/+/384240
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-09 21:50:10 +00:00
Robert Griesemer
5d3476c3db spec: use "core type" rather than "structural type"
This change in terminology prevents potential confusion
that migth be caused by associating "structural type"
with "structural typing"; the two are not connected.

Also, adjusted introductory paragraph of section on
constraint type inference: type inference goes in both
directions, from type parameter to core type and vice
versa. The previous description was not quite accurate.

Change-Id: If4ca300f525eea660f68486302619aa6ad5dbc2c
Reviewed-on: https://go-review.googlesource.com/c/go/+/384238
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-09 21:50:07 +00:00
Carlos Amedee
a3aed62512 doc/go1.18: update Go 1.18 release note TODOs using relnote
For #47694.

Change-Id: I5f6850e171f574a5342671778df854dc68a5148f
Reviewed-on: https://go-review.googlesource.com/c/go/+/384554
Trust: Carlos Amedee <carlos@golang.org>
Run-TryBot: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
Trust: Alex Rakoczy <alex@golang.org>
Run-TryBot: Alex Rakoczy <alex@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-09 21:15:07 +00:00
Robert Griesemer
255acb0c05 doc/go1.18: document behavior of go/types predicates for extended interfaces
For #47694.

Change-Id: Ic27193b65ef4b3c0c932107b8731b5f8d3190ad5
Reviewed-on: https://go-review.googlesource.com/c/go/+/383918
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-09 05:39:47 +00:00
Robert Griesemer
3e514a0103 spec: explicitly define integer, floating-point, and complex types
The terms "integer type", "floating-point type", and "complex type"
are used frequently in the spec but are not explicitly (only indirectly)
defined.

Slightly rephrased the section on numeric types and introduce these
terms explicitly. Add links to this section.

Change-Id: I3fb888933bece047da8b356b684c855618e9aee4
Reviewed-on: https://go-review.googlesource.com/c/go/+/384157
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-08 22:16:52 +00:00
Josh Bleecher Snyder
69e1711f28 doc/go1.18: mention linker improvements
Change-Id: I12cad608448ddd17a5da2b1d1209007102d892a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/383914
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-07 23:45:09 +00:00
Ian Lance Taylor
fa04846404 doc/go1.18: mention new x/exp generic packages
Change-Id: I119cfb1a0da9af89ced78935b8fcdfdb8d9b4ab6
Reviewed-on: https://go-review.googlesource.com/c/go/+/383794
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2022-02-07 18:09:07 +00:00
Roland Shoemaker
0003d9da09 doc/go1.18: add crypto/x509 verifier notes
Change-Id: If3e835e868ae695ba232b57096c135ce2e73305b
Reviewed-on: https://go-review.googlesource.com/c/go/+/365835
Trust: Roland Shoemaker <roland@golang.org>
Trust: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2022-02-03 17:15:11 +00:00
Ian Lance Taylor
070951c5dc constraints: remove package
It has moved to golang.org/x/exp/constraints. Perhaps it will move
back to the standard library in a future release.

For golang/go#45458
Fixes golang/go#50792

Change-Id: I93aa251a7afe7b329a3d3faadc0c5d6388b1f0e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/382460
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-03 03:13:33 +00:00
Filippo Valsorda
a9384eef7a doc/go1.18: add crypto/tls, crypto/x509, and crypto/elliptic release notes
Updates #45428
Updates #41682

Change-Id: I811bc4f8ec8de6b6db6a2917e265a72134a05e78
Reviewed-on: https://go-review.googlesource.com/c/go/+/382454
Trust: Filippo Valsorda <filippo@golang.org>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2022-02-02 23:37:18 +00:00
Robert Griesemer
a42bbf47d6 doc/go1.18: explain changes to compiler error messages
For #47694.
For #50954.

Change-Id: I3789e145d64025fe2bf787fa5d01a21832903586
Reviewed-on: https://go-review.googlesource.com/c/go/+/381968
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-01 18:15:11 +00:00
Robert Griesemer
125c5a3d69 doc/go1.18: document restrictions for real, imag, complex
For #47694.
For #50912.
For #50937.

Change-Id: I3fae6c8dbbd61a45e669b8fb0c18ac76f2183963
Reviewed-on: https://go-review.googlesource.com/c/go/+/381967
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-01 18:15:07 +00:00
Robert Griesemer
9152e21132 spec: add section on comparable constraint
For #50646.
Fixes #50791.

Change-Id: I8fec25ae3f0280c5b5a778011d23842b886ba79e
Reviewed-on: https://go-review.googlesource.com/c/go/+/381896
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-02-01 15:39:16 +00:00
Ian Lance Taylor
122654739d doc/go1.18: mention new debug/dwarf DataBitOffset fields
For #46784
For #47694
For #50685

Change-Id: I5351b56722d036a520d1a598ef7af95c5eb44c35
Reviewed-on: https://go-review.googlesource.com/c/go/+/381778
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2022-01-29 19:58:17 +00:00
Ian Lance Taylor
1fadc392cc doc/go1.18: in workspace mode doc, link to "go work" docs
For #45713
For #47694

Change-Id: I6f615c07749fca49c19f2ae22f79971c29aa8183
Reviewed-on: https://go-review.googlesource.com/c/go/+/381779
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2022-01-28 23:08:40 +00:00
Robert Griesemer
654d5f4b5d spec: add section on type inference
Change-Id: Ic338788d6410ed0d09ad129811377ee9ce5ed496
Reviewed-on: https://go-review.googlesource.com/c/go/+/367954
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-28 22:17:23 +00:00
Robert Griesemer
db48840cfc Revert "spec: document the underlying type of comparable"
This reverts CL 380854.

Per the conluding discussions on #50791. A follow-up will
document `comparable` more thoroughly.

For #50791.

Change-Id: I15db9051784a012f713e28d725c3b8bbfeb40569
Reviewed-on: https://go-review.googlesource.com/c/go/+/381076
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-26 23:43:39 +00:00
Russ Cox
c8b0dcea4a doc/go1.18: note short-circuit and/or in html/template
It was already noted in text/template; copied from there.

Change-Id: Ie749d04004af60f2333073ddf556ff7e16c81c45
Reviewed-on: https://go-review.googlesource.com/c/go/+/379794
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-26 20:51:54 +00:00
Robert Griesemer
719e9894f9 spec: document the underlying type of comparable
For #50791.

Change-Id: I7f135bb6626128a3cee9fd71c57535c1fc83ac7f
Reviewed-on: https://go-review.googlesource.com/c/go/+/380854
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-26 17:58:00 +00:00
Ian Lance Taylor
b7fa0f941f spec: minor formatting and link cleanups
Mostly from CL 367954.

Change-Id: Id003b0f785a286a1a649e4d6e8c87d0418a36545
Reviewed-on: https://go-review.googlesource.com/c/go/+/379920
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2022-01-21 23:16:33 +00:00
Robert Griesemer
d15481b8c7 Revert "doc/go1.18: document type parameter name restriction"
This reverts CL 376414.

For #47694.
For #50481.

Change-Id: Ie73961046e52e6e5d3262ef0aeaa24bec7eaa937
Reviewed-on: https://go-review.googlesource.com/c/go/+/379835
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-21 01:14:28 +00:00
Ian Lance Taylor
a4d3c73ac3 doc/go1.18: don't mention -buildinfo flag
It was removed in CL 378576.

For #50501

Change-Id: I26b8f0e99a40fa5c616aa4849a6ab15dd0d072f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/379314
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2022-01-19 20:47:21 +00:00
Robert Griesemer
4042194f2d spec: add another example for an invalid shift case
Fixes #45114.

Change-Id: I969e5f1037254fc0ffbba2fc07a81a3987e6b05f
Reviewed-on: https://go-review.googlesource.com/c/go/+/379275
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-19 04:00:05 +00:00
Bryan C. Mills
71888fe4b0 doc/go1.18: add a release note for 'go mod tidy' checksum changes
Updates #47738
Fixes #49598

Change-Id: I708dcb880a701699116227a9eaca994cf460fef9
Reviewed-on: https://go-review.googlesource.com/c/go/+/378577
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Trust: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-01-18 21:38:42 +00:00
Keith Randall
24239120bf doc: mention that GOAMD64 is a compile-time setting
Fixes #50589

Change-Id: Ic260a6edd9af5c9c6dd8b40f0830f88644c907f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/378179
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-01-13 00:53:53 +00:00
Robert Griesemer
3df4472201 spec: adjust rules for specific types once more
Introduce a (local) notion of a set of representative types,
which serves as a representation/approximation of an
interface's actual type set. If the set of representative
types is is non-empty and finite, it corresponds to the set
of specific types of the interface.

In the implementation, the set of representative types serves
as a finite representation of an interface's type set, together
with the set of methods.

Change-Id: Ib4c6cd5e17b81197672e4247be9737dd2cb6b56f
Reviewed-on: https://go-review.googlesource.com/c/go/+/376834
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-12 01:41:46 +00:00
Robert Griesemer
ade5488d75 doc/go1.18: document type parameter name restriction
For #47694.

Change-Id: I00862f987a0ff9f71e0295ce4320e6f9a6a4332f
Reviewed-on: https://go-review.googlesource.com/c/go/+/376414
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-07 18:20:24 +00:00
Robert Griesemer
40afced8d7 spec: be more precise with rules on specific types
Problem pointed out on golang-nuts mailing list.

Change-Id: If1c9b22e1ed7b4ec7ebcaadc80fa450333e6856c
Reviewed-on: https://go-review.googlesource.com/c/go/+/375799
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-07 02:37:20 +00:00
Robert Griesemer
2bb7f6b4f1 doc/go1.18: point to spec in same directory for release notes
The release notes explicitly refer to sections updated
for generics in the spec but then point to the old spec
which is very confusing for beta users.

For #47694

Change-Id: I5b555db3543cc32f088a8b267ec3f1195a52a812
Reviewed-on: https://go-review.googlesource.com/c/go/+/373174
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-01-07 02:32:39 +00:00
Ulrich Kunitz
b5bfaf410a doc: improve documentation for GOAMD64
The change clarifies in the release notes for go1.18 that the variable
is for compilation and references the microarchitecture description in
the Go Wiki,
https://golang.org/wiki/MinimumRequirements#amd64,
and references the same information in the output of go help
environment.

Fixes #50174

Change-Id: I6a7d5a06f48463a810c96cc9c76fe66113d5147c
Reviewed-on: https://go-review.googlesource.com/c/go/+/372194
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-01-06 00:26:47 +00:00
Ian Lance Taylor
1c8f9d2c97 doc/go1.18: mention new cmd/go fuzzing flags
For #47694

Change-Id: I00da9bd39700e938ec492daa71aba2035d911a06
Reviewed-on: https://go-review.googlesource.com/c/go/+/374354
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Katie Hockman <katie@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
2022-01-04 21:10:15 +00:00
Ian Lance Taylor
b357b05b70 doc/go1.18: add section for runtime/debug changes
For #37475
For #47694

Change-Id: If8c1f1b756daf32648110f1a669b2ea60f797a24
Reviewed-on: https://go-review.googlesource.com/c/go/+/373875
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-23 20:03:38 +00:00
Ian Lance Taylor
0e4b878258 doc/go1.18: mention debug/plan9obj.ErrNoSymbols
For #47694
For #48052

Change-Id: I136be9b498033309d876099aae16bad330555416
Reviewed-on: https://go-review.googlesource.com/c/go/+/373774
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2021-12-23 19:58:13 +00:00
Carl Johnson
d2ce939604 doc/go1.18: fix broken HTML in net/http.MaxBytesHandler
For #47694

Sorry about that! I guess the autocompleter in VSCode auto-closed the paragraph and I didn't notice.

Change-Id: I1e834e47deb708cd5285d26201a442305f8c3b24
GitHub-Last-Rev: ab88731551
GitHub-Pull-Request: golang/go#50305
Reviewed-on: https://go-review.googlesource.com/c/go/+/374014
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-12-22 23:31:40 +00:00
Ian Lance Taylor
0f3becf62f doc/go1.18: list new net/netip and net functions and methods
For #46518
For #47694

Change-Id: I4848556674baf85ceec350645d9eddcd83f1b2e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/373834
Trust: Ian Lance Taylor <iant@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2021-12-22 18:43:55 +00:00
Ian Lance Taylor
d7b035f930 doc/go1.18: mention testing.F in testing package section
For #47694

Change-Id: I27d88d864319bd8dbabfa6675a6abf2f74c50717
Reviewed-on: https://go-review.googlesource.com/c/go/+/373914
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Katie Hockman <katie@golang.org>
2021-12-22 18:38:41 +00:00
Ian Lance Taylor
90fb5a4f97 doc/go1.18: document {text,html}/template {break,continue} commands
For #20531
For #47694

Change-Id: Iaefaa0a8982eabf59cd6a53120c8af9124d60d1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/373915
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-22 00:11:21 +00:00
Carl Johnson
ebac50e9ce doc/go1.18: add net/http.MaxBytesHandler
For #47694

Change-Id: Ifab2c2720ec2ccef175a0e14a95f8df0437eb009
GitHub-Last-Rev: f3c2f12c7b
GitHub-Pull-Request: golang/go#50250
Reviewed-on: https://go-review.googlesource.com/c/go/+/373015
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-21 23:09:59 +00:00
Ian Lance Taylor
60f2c12a85 doc/go1.18: mention new go/types/Config.Context field
For #47694
For #47916

Change-Id: Ieeffaf161da744adfdb4da8aac58a64c109ebcab
Reviewed-on: https://go-review.googlesource.com/c/go/+/373775
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-21 22:26:48 +00:00
Ian Lance Taylor
9502339561 doc/go1.18: mention new debug/elf.R_PPC64_RELATIVE constant
For #47694

Change-Id: I9f4838100741d3ba13e9374e70466fa405c6e4d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/372634
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-21 18:43:00 +00:00
Ian Lance Taylor
529939072e doc/go1.18: document union element restriction
For #47694

Change-Id: I9af871a4a45b002e72629904011aac8f076617f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/372974
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-12-17 03:59:09 +00:00
Robert Griesemer
3c495839fe spec: describe constraint parsing ambiguity and work-around more precisely
The new description matches the implementation (CL 370774).

Also, in the section on type constraints, use "defines" instead of
"determines" because the constraint interface defines the type set
which is precisely the set of acceptable type arguments.

For #49482.

Change-Id: I6f30f49100e8ba8bec0a0f1b450f88cae54312eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/372874
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-17 03:28:06 +00:00
Robert Griesemer
2bdf34f3e8 spec: clarify that comparable cannot be a union element
For #49602.

Change-Id: I0d3ff8f087dffb3409918494147fd1dceff7514d
Reviewed-on: https://go-review.googlesource.com/c/go/+/372694
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-17 03:28:05 +00:00
Hana
b1c7703f26 doc/go1.18: discuss embedded build info compatibility
Fixes #50085

Change-Id: I9be8ddb983fb4fe598becbb0b93bb5b7e1f8438f
Reviewed-on: https://go-review.googlesource.com/c/go/+/372214
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2021-12-15 14:48:19 +00:00
Ian Lance Taylor
9d0ca262bb doc/go1.18: mention that embedding a type parameter is forbidden
For #47694

Change-Id: Ibf38eabcb78abc563fcf77e2b566175a18c06fa3
Reviewed-on: https://go-review.googlesource.com/c/go/+/372114
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-15 00:33:55 +00:00
Brad Fitzpatrick
dc5a8f9647 doc/go1.18: fix an unclosed anchor
Change-Id: I432bcc6ff917d008598b2f37c6e826f588a3d6d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/372074
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
2021-12-14 23:57:51 +00:00
Olivier Mengué
38c067d178 doc: fix typo in 1.18 release notes for package testing
In release notes for Go 1.18, fix typo in changes for package testing to
correctly document the change in CL 343883.

Change-Id: I40d92858ed3f74554a094466c06771f83dd81942
Reviewed-on: https://go-review.googlesource.com/c/go/+/371616
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
2021-12-14 23:55:40 +00:00
Ian Lance Taylor
1540239f48 doc/go1.18: add caution about use of generics in production
Per https://groups.google.com/g/golang-dev/c/iuB22_G9Kbo/m/7B1jd1I3BQAJ.

For #47694

Change-Id: I033cdadb2067e432f7c307d1546b4c5d0cfd5d8c
Reviewed-on: https://go-review.googlesource.com/c/go/+/371954
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-12-14 22:42:47 +00:00
Cherry Mui
fc8ae9860a doc/go1.18: move debug/buildinfo to core library section
It is a new package and seems a major change.

Updates #47694.

Change-Id: If854e494e28bcd1e79c99e59119755b9cb6793d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/371816
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2021-12-14 21:23:43 +00:00
Michael Matloob
265fbaa94b doc: update go1.18 release notes with a blurb about workspace mode
For #47694

Change-Id: I79cdbdc66ea9942b597f29c9a4f428075f053466
Reviewed-on: https://go-review.googlesource.com/c/go/+/371295
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
2021-12-14 19:10:22 +00:00
Cherry Mui
46ba32a2ca doc/go1.18: remove residual TODOs
There doesn't seem anything that still needs to de done there.

Updates #47694.

Change-Id: I7909f566638332f3904d20a34f61d371af1d2da2
Reviewed-on: https://go-review.googlesource.com/c/go/+/371754
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Trust: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Alex Rakoczy <alex@golang.org>
2021-12-14 17:22:06 +00:00
Robert Griesemer
083ef54624 spec: fix conversion rules (match implementation)
As written, the conversion P(x), where P and the type
of x are type parameters with identical underlying types
(i.e., identical constraints), is valid. However, unless
the type of x and P are identical (which is covered with
the assignability rule), such a conversion is not valid
in general (consider the case where both type parameters
are different type parameters with constraint "any").

This change adjusts the rules to prohibit type parameters
in this case. The same reasoning applies and the analogue
change is made for pointer types.

The type checker already implements these updated rules.

Change-Id: Id90187900cb2820f6a0a0cf582cf26cdf8addbce
Reviewed-on: https://go-review.googlesource.com/c/go/+/371074
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-13 18:41:35 +00:00
Tim King
766f89b5c6 doc: document cmd/vet changes for 1.18 release
cmd/vet has several precision improvements for the checkers copylock, printf, sortslice, testinggoroutine, and tests. Adds a high level mention in the release notes and an example of string constant concatenation.

Updates #47694

Change-Id: I7a342a57ca3fd9e2f3e8ec99f7b647269798317f
Reviewed-on: https://go-review.googlesource.com/c/go/+/370734
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Tim King <taking@google.com>
Run-TryBot: Tim King <taking@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-10 19:26:50 +00:00
Robert Findley
d6c4583ad4 doc: document the new types.Config.GoVersion field
Also update some other go/types release notes to use the present tense.

Updates #47694

Change-Id: I654371c065e76fd5d22679d0d3c1a81bc3d1e513
Reviewed-on: https://go-review.googlesource.com/c/go/+/370235
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-12-08 23:38:20 +00:00
Robert Findley
9e29dd42df doc: document cmd/vet changes for generics in 1.18
Fixes #50011
Updates #47694

Change-Id: Id3d43f2f72de61b360b79c2b375ca1372d5f4692
Reviewed-on: https://go-review.googlesource.com/c/go/+/369979
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tim King <taking@google.com>
2021-12-08 21:21:44 +00:00
Dan Scales
7b7efd7a7c doc: add in release note about compiler being roughly 15% slower
Updates #49569

Change-Id: Ifba769993c50bb547cb355f56934fb572ec17a1a
Reviewed-on: https://go-review.googlesource.com/c/go/+/370154
Reviewed-by: Austin Clements <austin@google.com>
Trust: Dan Scales <danscales@google.com>
2021-12-08 18:06:06 +00:00
Austin Clements
c759ec2284 doc/go1.18: clarify additions to net package API
For #47694.

Updates #46518.

Change-Id: Ife3a8d3d6a1c50f55b5ab15730d5a6bd3ec512e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/370134
Trust: Austin Clements <austin@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
2021-12-08 17:04:27 +00:00
Ian Lance Taylor
a19e72cb89 doc/go1.18: move fuzzing to tools section
For #47694

Change-Id: Idab1a5822a096447c71776ee4339c4262183ceb7
Reviewed-on: https://go-review.googlesource.com/c/go/+/370034
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Katie Hockman <katie@golang.org>
2021-12-08 04:14:00 +00:00
Austin Clements
e08d1fba37 doc/go1.18: mention bytes.Cut and strings.Cut
For #47694.

Updates #46336.

Change-Id: Ibbd058a1fd4d6b0aa38d3e8dc15b560d1e149f7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/369981
Trust: Austin Clements <austin@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-12-07 21:32:48 +00:00
Austin Clements
dc50d69119 doc/go1.18: drop TODO for "Changes to the language"
For #47694

Change-Id: I142776001eecb451e8722163cfd3f2ecb0ecf35c
Reviewed-on: https://go-review.googlesource.com/c/go/+/369980
Trust: Austin Clements <austin@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-12-07 21:31:42 +00:00
Jeremy Faller
085d6ff531 doc/go1.18: add docs for -count when benchmarking
CL 356669

Updates #47694

Change-Id: I49e0cdd3b34e81e9e44020a8eb1304d78249cd66
Reviewed-on: https://go-review.googlesource.com/c/go/+/368677
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-07 17:59:54 +00:00
Jeremy Faller
d16a57542a doc/go1.18: add new sync.[RW]Mutex methods
CL 319769

Updates #47694

Change-Id: I9655af0d249926617645c33617d53b73f985aa19
Reviewed-on: https://go-review.googlesource.com/c/go/+/368797
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-06 21:14:21 +00:00
Jeremy Faller
870f33f6ef doc/go1.18: add changes to strconv.Unquote to release notes
CL 343877

Updates #47694

Change-Id: I37a0a0d1f7ab937b12812981ecddc89eb8c99c24
Reviewed-on: https://go-review.googlesource.com/c/go/+/368796
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Joe Tsai <joetsai@digital-static.net>
2021-12-06 21:09:34 +00:00
Jeremy Faller
1c4cf50e11 doc/go1.18: add docs for js.Wrapper's removal
CL 356430

Updates #47694

Change-Id: I802cd50f2827caa0549c25685c0b1bb8dfc40968
Reviewed-on: https://go-review.googlesource.com/c/go/+/368799
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-12-06 21:02:48 +00:00
Jeremy Faller
0bbb74b5ac doc/go1.18: add changes to regexp to release notes
CL 354569

Updates #47694

Change-Id: I78536c110215b3c9f247c1420bcaa5fc3d8fb930
Reviewed-on: https://go-review.googlesource.com/c/go/+/368795
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-06 21:01:12 +00:00
Austin Clements
9ecb853cf2 doc/go1.18: minor tweaks to generics section
This CL reorders the bullet points in the generics section to more
closely match what I think users will consider most important. I put
the ~ token before the mention of ~T in interfaces to avoid a forward
reference, though I wonder if we actually want to spent a couple more
sentences saying what union and ~T types are, since most people are
going to care about that a lot more than they care about the low-level
detail that there's a new token.

For #47694.

Change-Id: Ib84f096ef6346a711801268ce362b64fa423d3f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/369734
Trust: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-06 19:50:32 +00:00
Austin Clements
2cb9042dc2 doc/go1.18: cite CLs for more efficient scavenging
For #47694.

Change-Id: Ic6088b1811600670a57f28426f4158a7c7517c82
Reviewed-on: https://go-review.googlesource.com/c/go/+/369616
Trust: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-12-06 17:34:53 +00:00
Robert Findley
f8a8a73096 go/types, types2: unexport NewTypeList
NewTypeList was not part of the go/types API proposal, and was left in
by accident. It also shouldn't be necessary, so remove it.

Updates #47916

Change-Id: I4db3ccf036ccfb708ecf2c176ea4921fe68089a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/369475
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-12-06 14:58:33 +00:00
Ian Lance Taylor
3396878af4 doc/go1.18: use correct link for reflect.PointerTo
For #47694

Change-Id: Iee4fda069a56ea4436b8aa32e2605f3349d7c154
Reviewed-on: https://go-review.googlesource.com/c/go/+/369334
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-12-04 17:16:07 +00:00
Jeremy Faller
1876b38263 doc/go1.18: add docs for SysProcAttr.Pdeathsig
CL 355570

Updates #47694

Change-Id: I922cda28ca4cf1ae6d5e4f457cc66d5041b0e3e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/368798
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2021-12-04 11:59:35 +00:00
Robert Griesemer
549cfefc72 doc/go1.18: expand section on generics
Also, move it up in the document.

Updates #47694

Change-Id: I927c4c845089a5c22e2c5b5f3de1831c04c6d990
Reviewed-on: https://go-review.googlesource.com/c/go/+/369102
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-04 04:50:55 +00:00
Robert Griesemer
cd5f2cf50f doc/go1.18: add documentation for changes to go/types
The number of involved CLs is too large (hundreds) so
no CLs are mentioned in (html) comments.

Updates #47694

Change-Id: I655d800a1e56a71e9d70a190f1c42c17baf6861e
Reviewed-on: https://go-review.googlesource.com/c/go/+/369099
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-04 04:41:31 +00:00
Robert Griesemer
fa88ba1e8a doc/go1.18: add documentation for changes to go/ast
Updates #47694

Change-Id: Ied26f6345df2c8640d4be5132a05db3897b59009
Reviewed-on: https://go-review.googlesource.com/c/go/+/369096
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-04 01:07:28 +00:00
Robert Griesemer
821bf04f2a doc/go1.18: add documentation for changes to go/token
Updates #47694

Change-Id: I232fb20b3a77409b84c15f9ec1586e480f0f6390
Reviewed-on: https://go-review.googlesource.com/c/go/+/369095
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-04 01:07:21 +00:00
Robert Griesemer
ba83aa7caa doc/go1.18: add documentation for changes to go/constant
Updates #47694

Change-Id: I2ce5aaa4493259790712a8a49e5b03472c8a7400
Reviewed-on: https://go-review.googlesource.com/c/go/+/369094
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2021-12-04 01:07:10 +00:00
Hossein Zolfi
d20a0bfc8a doc/go1.18: change github.com/golang/go/issues to golang.org/issue
Updates #47694

Change-Id: I84547ff995e2a302cf229fefefd28a7220a17028
Reviewed-on: https://go-review.googlesource.com/c/go/+/369016
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Trust: Austin Clements <austin@google.com>
2021-12-03 21:25:05 +00:00
Austin Clements
ebe99189fc doc/go1.18: catch up with runtime/compiler commits and API changes
For #47694.

Change-Id: I21b1af1807d4da2fb2f4d9b961d44a21d715d7d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/369155
Trust: Austin Clements <austin@google.com>
Trust: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-12-03 21:23:09 +00:00
Katie Hockman
deb988a286 doc/go1.18: mention fuzzing in the release notes
Also make a few small formatting fixes.

Change-Id: Iad99d030312393af3b6533f2cd00f09aea0f2a7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/369074
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-12-03 18:09:19 +00:00
Austin Clements
d921bb21df doc/go1.18: reorganize runtime/compiler a little
For #47694.

Change-Id: Iedf85f522f7c79ae0a61b4fc1f2f092cf7b613df
Reviewed-on: https://go-review.googlesource.com/c/go/+/368696
Trust: Austin Clements <austin@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-12-03 17:13:03 +00:00
Ian Lance Taylor
8835343280 doc/go1.18: mention new -asan option
For #44853
For #47694

Change-Id: Ia76246218b1361d8bdf510bbfc5178c83cdd3eec
Reviewed-on: https://go-review.googlesource.com/c/go/+/368834
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-12-02 23:02:33 +00:00
Jeremy Faller
06dbf6121a doc/go1.18: remove some TODOs for changes we aren't mentioning
Updates #47694

Change-Id: I8fdbded4aaf974425ee317a1cdd940a5ac88c0b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/368794
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-02 22:06:27 +00:00
Jeremy Faller
48e4284e55 doc/go1.18: add docs on FieldByIndexErr
From:
https://go-review.googlesource.com/c/go/+/357962/

Updates #47694

Change-Id: I2d43dcbd28c03457b55eada26e87f7710a113b0c
Reviewed-on: https://go-review.googlesource.com/c/go/+/368364
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-02 22:06:10 +00:00
Jeremy Faller
e533b5793f doc/go1.18: add docs on new reflect.Value methods
From:

https://go-review.googlesource.com/c/go/+/352131/

Updates #47694

Change-Id: I7c7811c49900049f5ef7fc906fe25d2ffd73c7b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/368363
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-02 22:05:56 +00:00
Jeremy Faller
f9b2733e3a doc/go1.18: add docs on MapIter.Reset
From:

https://go-review.googlesource.com/c/go/+/321891

Updates #47694

Change-Id: I2cdd5d9f3da62a5690cd2ef921ed48957c602d64
Reviewed-on: https://go-review.googlesource.com/c/go/+/368360
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-02 22:05:01 +00:00
Jeremy Faller
bcb98f126b doc/go1.18: add docs on User.GroupIds
Cobbled up some release notes from:

https://go-review.googlesource.com/c/go/+/330753/

Updates #47694

Change-Id: I249e4b96b7d51185b07c11a734505677e9e36315
Reviewed-on: https://go-review.googlesource.com/c/go/+/368358
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Kirill Kolyshkin <kolyshkin@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-02 22:04:50 +00:00
Jeremy Faller
c8c89d20ce doc/go1.18: add docs on Cookie.Valid
Updates #47694

Change-Id: Ibf3e25fbccf82e4abd7bd76b2ea6ceb4b05d4664
Reviewed-on: https://go-review.googlesource.com/c/go/+/368357
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-02 22:04:23 +00:00
Jeremy Faller
25f06cb71f doc/go1.18: add deprecation note for net.Error.Temporary
Updates #47694

Change-Id: Ia25ad49f688efa3d60d83290095648711704b478
Reviewed-on: https://go-review.googlesource.com/c/go/+/368316
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-02 22:03:54 +00:00
Jeremy Faller
94e22fa03e doc/go1.18: add Conn.NetConn documentation to crypto/tls section
Updates #47694

Change-Id: Iead44baa8b2a06ecf7b92d343ed9117f0fc0793e
Reviewed-on: https://go-review.googlesource.com/c/go/+/368315
Trust: Jeremy Faller <jeremy@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com>
2021-12-02 22:03:34 +00:00
Jeremy Faller
d3bf627bc1 doc/go1.18: add constraints package documentation
Updates #47694

Change-Id: I3239023dad194c317e271e6093eff2cfbed1a4b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/368314
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-12-02 22:03:11 +00:00
Jeremy Faller
d514411625 doc/go1.18: add information on new pacer.
This is based off Michael's notes.

Updates #47694

Change-Id: I6e7944f85b776e8481829a2fafd177a49557c6ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/368156
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2021-12-02 22:02:54 +00:00
Jeremy Faller
3c6295d272 doc/go1.18: add short-circuit evaluation for text/template
This description is based on https://golang.org/cl/321490.

Updates #47694

Change-Id: I48656cd487d2fccf0b0d3390f350f1bc6f2b0080
Reviewed-on: https://go-review.googlesource.com/c/go/+/365738
Trust: Jeremy Faller <jeremy@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-12-02 20:45:47 +00:00
Cherry Mui
c3a7fb2074 doc/go1.18: mention stack trace change
For #47694.

Change-Id: I06cac88d5328c8c0e38212ad801d70bc36cdfc6f
Reviewed-on: https://go-review.googlesource.com/c/go/+/368234
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Austin Clements <austin@google.com>
2021-12-01 22:20:39 +00:00
Robert Griesemer
61ff501968 spec: adjust section on package unsafe for type parameters
Change-Id: I562d4648756e710020ee491f3801896563a89baa
Reviewed-on: https://go-review.googlesource.com/c/go/+/367395
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-29 19:24:41 +00:00
Robert Griesemer
68da368a4e spec: rules for index expressions, len, cap, with type parameter types
We want to support some special cases for index expressions, len, and
cap on operands of type parameters (such as indexing a value constrained
by byte slices and strings), hence the extra rules.

Change-Id: I4a07dc7e64bb47361b021d606c52eae1784d5430
Reviewed-on: https://go-review.googlesource.com/c/go/+/366814
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
2021-11-29 19:24:34 +00:00
Robert Griesemer
37a5d720d4 spec: corrections to various sections
- fix definition of "specific types" and add more examples
- state that a parameterized function must be instantiated
  when used as a function value
- remove duplicate word ("can can" -> "can")

Thanks to @danscales for finding these.

Change-Id: Ideb41efc35a3e67694d3bc97e462454feae37c44
Reviewed-on: https://go-review.googlesource.com/c/go/+/367394
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2021-11-29 19:24:26 +00:00
Jason A. Donenfeld
a59ab29bf2 doc/go1.18: use <code> instead of <pre> for target specification
For #47694.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Change-Id: I38c2fd9b57fbbacf220a2bc679f67e2dfdcc7cb1
Reviewed-on: https://go-review.googlesource.com/c/go/+/367514
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-29 16:08:23 +00:00
syumai
0fa53e41f1 spec: fix link for instantiations
This change corrects the link `Instantiantions` to `Instantiations` in the spec.

Change-Id: Ib0ed03420ae401d20af1ea723c5487018b2f462d
GitHub-Last-Rev: b84316c818
GitHub-Pull-Request: golang/go#49816
Reviewed-on: https://go-review.googlesource.com/c/go/+/367274
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-11-27 23:29:50 +00:00
Carlo Alberto Ferraris
a142d6587c doc: go1.18 release notes for CLs 323318/332771
Updates #47694

Change-Id: Ib76737996a701906117e096eb6d05b388576a874
GitHub-Last-Rev: 05b9649965
GitHub-Pull-Request: golang/go#49588
Reviewed-on: https://go-review.googlesource.com/c/go/+/363840
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Daniel Martí <mvdan@mvdan.cc>
2021-11-27 19:49:32 +00:00
Jason A. Donenfeld
77038044ca doc/go1.18: document non-cooperative preemption on windows/arm{,64}
For #47694.
Updates #49759.

Change-Id: I7accd81b8ea6c31e4a2b5e155cf93fe9c447813b
Reviewed-on: https://go-review.googlesource.com/c/go/+/367095
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
2021-11-26 13:18:11 +00:00
jiahua wang
5527d7ff79 doc/go1.18: add Clone doc
For #47694

Change-Id: I3b135f6ff199d7a9746726b131fbe7dd97a8e95e
Reviewed-on: https://go-review.googlesource.com/c/go/+/364254
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Heschi Kreinick <heschi@google.com>
2021-11-24 21:08:29 +00:00
Robert Griesemer
696515ee39 spec: type assertions and switches don't operate on type parameters
Change-Id: I11111b3617673be94508128489aed6488d518537
Reviewed-on: https://go-review.googlesource.com/c/go/+/366834
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-24 20:54:12 +00:00
Robert Griesemer
6ea17aa52c spec: adjust type identity rules for type parameters
Change-Id: I5ffc7f26236487070447eaa0f6b14d1fab44c3c7
Reviewed-on: https://go-review.googlesource.com/c/go/+/366794
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-24 20:54:07 +00:00
Robert Griesemer
a3b8f627c2 spec: add section on instantiation
Change-Id: I2770da87b4c977b51dfa046f2f08283917675e1c
Reviewed-on: https://go-review.googlesource.com/c/go/+/365916
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2021-11-24 20:53:54 +00:00
Robert Griesemer
ce2a20af46 spec: adjust conversion rules for type parameters
Change-Id: I7bfddf4be0d1d95419f312bb349ae2e16b74b795
Reviewed-on: https://go-review.googlesource.com/c/go/+/365915
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-24 20:53:51 +00:00
Robert Griesemer
939480033a spec: adjust assignability rules for type parameters
Change-Id: I3c4d8bdb5e92ee7fdca9593fb043f94f467755e8
Reviewed-on: https://go-review.googlesource.com/c/go/+/365434
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-24 20:53:45 +00:00
Robert Griesemer
003e7faf53 spec: adjust representability rules for type parameters
Change-Id: I4423a059527066c4418c195911f8184dfd3f5a15
Reviewed-on: https://go-review.googlesource.com/c/go/+/365914
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-24 20:53:29 +00:00
Robert Griesemer
5d8c49a5a1 spec: add definition of "specific types" of an interface
The notion of specific types will be used to define rules for
assignability, convertability, etc. when type parameters are
involved.

Change-Id: Ic5c134261e2a9fe05cdf25efd342f052458ab5c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/366754
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-24 20:51:25 +00:00
Dmitri Shuralyov
e883005d2a doc/go1.18: document that iOS 12 or newer is required
For #47694.
Updates #49616.
Updates #48076.

Change-Id: I570564c3a54d3cd9cfc9b8267df9fbee3363b650
Reviewed-on: https://go-review.googlesource.com/c/go/+/366914
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-11-24 18:59:20 +00:00
Robert Griesemer
0244343088 spec: fix Swap example (correctly swap type arguments and parameters)
Thanks to @danscales for noticing the mistake.

Change-Id: I547ee80a78419765b82d39d7b34dc8d3bf962c35
Reviewed-on: https://go-review.googlesource.com/c/go/+/366215
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
2021-11-22 23:00:32 +00:00
Robert Griesemer
7456b94853 doc/go1.18: document new overflow error for some untyped arguments to print/ln
Fixes #49216.
For #47694.

Change-Id: Ib129d790c382ddcc9677d87db4ca827b7159856a
Reviewed-on: https://go-review.googlesource.com/c/go/+/366275
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-22 22:36:03 +00:00
Robert Griesemer
7fbe2f4cc8 doc/go1.18: document compiler change for "declared but not used" errors
Fixes #49214.
For #47694.

Change-Id: Iba68ed17bfd81890309b6a6732087f87a03e1350
Reviewed-on: https://go-review.googlesource.com/c/go/+/366274
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-22 22:35:57 +00:00
Robert Griesemer
e30ebaab0b spec: add section on the structure of interfaces
This change introduces the notion of a structural interface
and its corresponding structural type.

Change-Id: Ib5442dfd04cb5950b4467428cae51849f8922272
Reviewed-on: https://go-review.googlesource.com/c/go/+/365474
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-22 04:27:29 +00:00
Robert Griesemer
a287c4aa38 spec: add type parameter types
- add section on type parameters
- added two sections on the scope of type parameters
- expanded general section on types accordingly
- introduced the notion of a named type which will
  help in simplifying various rules (subsequent CLs)

Change-Id: I49c1ed7d6d4f951d751f0a3ca5dfb637e49829f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/365414
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-22 03:24:07 +00:00
Robert Griesemer
0c3b4a358a spec: add type parameter lists
Change-Id: I29e9188a0fa1326c2755a9b86aeb47feaa8019be
Reviewed-on: https://go-review.googlesource.com/c/go/+/365274
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-22 03:24:01 +00:00
Cherry Mui
ba9f0f6665 doc/go1.18: mention register ABI on ARM64 and PPC64
For #47694.

Change-Id: Ide378f4a34587027c3d84fed2126c5b9bd8f7287
Reviewed-on: https://go-review.googlesource.com/c/go/+/363694
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
2021-11-19 21:41:33 +00:00
Jeremy Faller
aec5c2eed6 [go] doc: document speedups to Trim[|Left|Right]
CL: #332771

Updates: #47694
Change-Id: I8c729084b7a8745ec73f87ef3c469edbd596ddb4
Reviewed-on: https://go-review.googlesource.com/c/go/+/365318
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Joe Tsai <joetsai@digital-static.net>
2021-11-19 21:36:24 +00:00
Jeremy Faller
0f75a9ecdf [go] doc: add new bufio functionality
cl/345570
cl/345569

Updates: #47694
Change-Id: I170af16d5fc9f022d3d29ed0772cfc3d02b8bbcf
Reviewed-on: https://go-review.googlesource.com/c/go/+/365317
Trust: Jeremy Faller <jeremy@golang.org>
Run-TryBot: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Joe Tsai <joetsai@digital-static.net>
2021-11-19 21:36:17 +00:00
Robert Griesemer
24898d6948 spec: various clarifications/fixes for method sets and interfaces
- fixed a typo in the method set section
- express in the syntax that ~T denotes an underlying type
- be more precise when talking about types vs type terms
- refer to "unions" rather than "union expressions"
- make it clear in the spec title that this is WIP

Change-Id: I9b2c4b1f77bc50dd574ed6893bedd40529c320fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/365154
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-18 20:11:45 +00:00
Robert Griesemer
f6647f2e3b spec: generalize method sets and interface types to type sets
This is the first of several CLs that update the existing
Go 1.17 spec for type parameters.

This CL updates the section on method sets and interface types.
It also adds "any", "comparable" to the list of predeclared
identifiers.

Change-Id: I0ce25dc02791c33150c0d949528512610faf3eab
Reviewed-on: https://go-review.googlesource.com/c/go/+/362999
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-18 06:05:29 +00:00
Keith Randall
febbef593e doc: mention generics in release notes
Also mention local types restriction.

We probably want to say more at some point, this is just a
placeholder to start.

Update #47631

Change-Id: I828e451e1e8504d21cb55c7132e9cb330b160a54
Reviewed-on: https://go-review.googlesource.com/c/go/+/364134
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
2021-11-16 06:31:54 +00:00
jiahua wang
865689571d doc/go1.18: add AppendRune doc
For #47694

Change-Id: I39594c273aeb038702457587ee1c46e4b3920bb6
Reviewed-on: https://go-review.googlesource.com/c/go/+/363359
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Trust: Jeremy Faller <jeremy@golang.org>
2021-11-16 05:36:07 +00:00
Keith Randall
dfa62c79de doc: document GOAMD64 environment variable
Update #47694

Change-Id: I9c90bd251616cd4d10434bd3b6e6c30c5c819e24
Reviewed-on: https://go-review.googlesource.com/c/go/+/363661
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-14 16:54:11 +00:00
Robert Griesemer
d60a4e69f1 spec: fix a broken link
Thanks for jtagcat@ for finding this.

Change-Id: If7324808edbae19ec8bf503b04e0426f3fb3b47a
Reviewed-on: https://go-review.googlesource.com/c/go/+/363394
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-11 19:44:13 +00:00
Neil Alexander
666fc173c0 doc/go1.18: document http.Transport.Dial* being used in js/wasm
This PR adds a note into the Go 1.18 changelog for CL 330852.

Updates #46923.

Change-Id: I99150e9275ce23fcf3697d6a22ac216818223c74
GitHub-Last-Rev: b2772ce68b
GitHub-Pull-Request: golang/go#49258
Reviewed-on: https://go-review.googlesource.com/c/go/+/360297
Trust: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-11 16:17:21 +00:00
Bryan C. Mills
47b3ab5ede doc/go1.18: add a release note for 'go mod vendor -o'
For #47327

Change-Id: I50418c0d017c4e90a2c13d26945ee639079e4e33
Reviewed-on: https://go-review.googlesource.com/c/go/+/363174
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Paschalis Tsilias <paschalistsilias@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-11 14:57:18 +00:00
Robert Griesemer
17980dff36 doc: make a copy of the latest Go 1.17 spec
This will allow us to compare the changes made for Go 1.18.

Change-Id: I1456270b201967f5cb05e66cec556939e6e33265
Reviewed-on: https://go-review.googlesource.com/c/go/+/362894
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-11-10 05:08:25 +00:00
smasher164
ab31dbc05b doc/go1.18: strings,bytes: deprecate Title
Updates #48367.

Change-Id: Ib8fc6d9dd7c3c6a70fefe077615f51a71d9c42ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/361899
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2021-11-08 14:49:56 +00:00
Dmitri Shuralyov
ba79c1e241 doc/go1.18: split bytes and strings packages
A small touchup after CL 361894.

For #47694.

Change-Id: Ifc161516f897f727195d21351a3c8eda7b6e327e
Reviewed-on: https://go-review.googlesource.com/c/go/+/361895
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Carlos Amedee <carlos@golang.org>
2021-11-05 22:54:47 +00:00
Dmitri Shuralyov
f00b43f28c doc/go1.18: fill in Go 1.18 release note TODOs using relnote
For #47694.

Change-Id: Ia80a1859bd0fc6f08d27293f519c22fd9a804fd2
Reviewed-on: https://go-review.googlesource.com/c/go/+/361894
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Carlos Amedee <carlos@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-11-05 22:00:37 +00:00
Bryan C. Mills
1f9dce749d cmd/go: download fewer dependencies in 'go mod download'
In modules that specify 'go 1.17' or higher, the go.mod file
explicitly requires modules for all packages transitively imported by
the main module. Users tend to use 'go mod download' to prepare for
testing the main module itself, so we should only download those
relevant modules.

In 'go 1.16' and earlier modules, we continue to download all modules
in the module graph (because we cannot in general tell which ones are
relevant without loading the full package import graph).

'go mod download all' continues to download every module in
'go list all', as it did before.

Fixes #44435

Change-Id: I3f286c0e2549d6688b3832ff116e6cd77a19401c
Reviewed-on: https://go-review.googlesource.com/c/go/+/357310
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-11-04 20:42:35 +00:00
Brad Fitzpatrick
2157498dfe doc/go1.18: remove some redundancy from netip docs
Change-Id: I593862331add3366f6b337844588568301746b80
Reviewed-on: https://go-review.googlesource.com/c/go/+/360608
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Trust: Brad Fitzpatrick <bradfitz@golang.org>
2021-11-02 22:20:40 +00:00