1
0
mirror of https://github.com/golang/go synced 2024-09-30 12:28:35 -06:00
Commit Graph

3233 Commits

Author SHA1 Message Date
Alberto Donizetti
f4be93a8f1 doc: update list of archs supporting -race
Change-Id: Id0a55674a16671aaee99182d9096a9263f7a80b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/189357
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-08-08 16:16:15 +00:00
Marcel van Lohuizen
0ed86cda67 doc: mention Unicode update in release notes
Fixes #33472

Change-Id: Iab69e69589f2e017f4cf9770858884b1a570c89e
Reviewed-on: https://go-review.googlesource.com/c/go/+/188799
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-08-06 19:12:41 +00:00
Jonathan Amsterdam
a4c825156d doc/go1.13.html: describe error-value additions
A brief description at the top the Standard Library section of the
changes to support error wrapping.

Fixes #33365.

Change-Id: Id5a3b2fe148d9bfb949f2cfc9e5d8a1613a0e219
Reviewed-on: https://go-review.googlesource.com/c/go/+/188798
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-08-05 23:12:39 +00:00
Agniva De Sarker
a2f5d644d3 doc/go1.13: add release notes for GOWASM environment variable
Change-Id: I103a21ae0be8feb9447fa277483b7c2a8b5807e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/188540
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Richard Musiol <neelance@gmail.com>
2019-08-03 08:47:32 +00:00
Ian Lance Taylor
55e23cb1fe doc/go1.13: mention confusion between keep-alive timeout and deadline
Updates #31449

Change-Id: I4d7075b20cd8171bc792e40b388f4215264a3317
Reviewed-on: https://go-review.googlesource.com/c/go/+/188819
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2019-08-02 21:03:47 +00:00
Emmanuel T Odeke
bdea352b96 doc/go1.13: document net/http.Transport.Request.Body unfurling
Documents the work from:
* CL 163599
* CL 163737

which now uses the Request.Body's io.ReaderFrom implementation,
if available, and permits system level optimizations such as
"sendfile" to be used to transmit/upload the Body, which greatly
speeds up file uploads.

Updates #33396

Change-Id: I7b8315c4b3e57ad47bb9be2b0c838857875d4bd5
Reviewed-on: https://go-review.googlesource.com/c/go/+/188457
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-08-02 17:58:08 +00:00
Alberto Donizetti
2d1a1e0a2a doc: fix Block interface parameters order
The Effective Go document references the crypto/cipher Block
interface, but the parameters' names are swapped. This change
alignes them to the crypto definition, to avoid confusion.

Fixes #33432

Change-Id: I8b9aac4dc6af3eec968bbc8f3ee5366b99016fcc
Reviewed-on: https://go-review.googlesource.com/c/go/+/188797
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-08-02 17:51:34 +00:00
Emmanuel T Odeke
d6f6a46c07 doc/go1.13: add more release notes for net/http
Fixes #33396

Change-Id: Id975a23b8d6555a3f19ef283fccbbe122f10acfe
Reviewed-on: https://go-review.googlesource.com/c/go/+/188477
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-08-01 20:32:27 +00:00
Andrew Bonventre
fe8a866464 doc/go1.12: document change in syscall.Setrlimit behavior
Fixes #30401

Change-Id: I7b5035ffc7333c746d4e31563df26ff4f934dfc6
Reviewed-on: https://go-review.googlesource.com/c/go/+/188237
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
2019-07-31 16:43:10 +00:00
Robert Griesemer
39d4178735 spec: add an example of a trivially invalid interface
In preparation for the forthcoming spec changes for #6977.
While at it, modernize existing File example that dates
back all the way to commit 18c5b488a3.

Change-Id: Id10e4df0513e3de15bd58867222923eefa9473ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/187978
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-07-31 05:45:43 +00:00
Jonathan Amsterdam
7b8234b48f go1.13.html: release note for %w
Also, reorder packages so the list is in alphabetical order.

Fixes #32914.

Change-Id: Ifa504cb7e48df31ba6dc0e5756148430b59fa139
Reviewed-on: https://go-review.googlesource.com/c/go/+/187797
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-07-29 20:29:54 +00:00
Daniel Martí
a25c2878c7 doc: use <code> for a few file paths that didn't
Spotted while seeing CL 187818 in master.

Change-Id: Ic3f42558f6833fc35580b2b2a15f2c5aba5713c0
Reviewed-on: https://go-review.googlesource.com/c/go/+/187822
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-07-27 23:29:18 +00:00
Giovanni Bajo
80f9d32438 doc: mention that GOPATH/bin should be in PATH
As noticed while mentoring at Gophercon, a common mistake for
beginners is that, after they install git-codereview, it's not
found by git because they haven't put GOPATH/bin in their
environment.

Change-Id: I885cee0f532a4069d1a17ea27365d54965ecca22
Reviewed-on: https://go-review.googlesource.com/c/go/+/187818
Reviewed-by: Katie Hockman <katie@golang.org>
2019-07-27 19:01:49 +00:00
Bryan C. Mills
b9df8df70f doc/go1.13: mention the effect of testing.Init on package initialization
Fixes #31859

Change-Id: I228ed93f9466d1a22f8796964f5d2f056ab9b62f
Reviewed-on: https://go-review.googlesource.com/c/go/+/186818
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Caleb Spare <cespare@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
2019-07-22 21:43:31 +00:00
Jay Conrod
f518a96e00 cmd/go: document go get @upgrade behavior in release notes
Fixes #33149

Change-Id: If9ff24fea6d087b4047a9f6e50f99f449f9b1c52
Reviewed-on: https://go-review.googlesource.com/c/go/+/186618
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-07-19 20:08:48 +00:00
Alberto Donizetti
5bc46cb712 doc/go1.13: remove 1.12 reference from 1.13 release notes
While it's true that CL 168479 was also backported to 1.12, this is
irrelevant for the Go1.13 release notes.

Change-Id: I044be69f8f2bc005f58a0d63db05129add15f674
Reviewed-on: https://go-review.googlesource.com/c/go/+/186138
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-07-17 17:34:32 +00:00
Bryan C. Mills
6bf2767cc8 cmd/go: tighten the check for pseudo-version base tags
Do not allow a pseudo-version derived from a canonical tag to refer to
the same revision as the tag itself. It's unnecessary (because
canonical tags already have a total ordering) and confusing (the
pseudo-version appears to come after the tag, but actually refers to
the exact same revision).

Updates #32879
Updates #27173

Change-Id: I02befedbe89c8819bdd93e470783ce63fc813193
Reviewed-on: https://go-review.googlesource.com/c/go/+/184720
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-07-16 15:37:25 +00:00
Filippo Valsorda
a6a7b148f8 crypto/tls: deprecate SSLv3 support
Updates #32716

Change-Id: Ia0c03918e8f2da4d9824c49c6d4cfca1b0787b0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/184102
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-07-15 23:00:52 +00:00
Alberto Donizetti
89d300b821 doc/go1.13: fix misspelling of "interpreted"
Change-Id: I465f10533cc76d8160e56bc49eabaf8127ac4e61
Reviewed-on: https://go-review.googlesource.com/c/go/+/186137
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-07-14 20:15:47 +00:00
Norman B. Lancaster
7942671a58 doc/go1.13: document removal of NaCl targets in Go 1.14
Go 1.14 will no longer run on Native Client (NaCl). Updating the 1.13
release notes to indicate this. See #30439.

Fixes #32948

Change-Id: Ia147bb053adc098bd696dbdb01553c23222f8134
Reviewed-on: https://go-review.googlesource.com/c/go/+/185537
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-07-12 16:53:22 +00:00
Alexander Rakoczy
c893ea8f8b doc: document Go 1.12.7
Change-Id: Id5d2f4cc6bc310bed2516ce0f50c395802475f66
Reviewed-on: https://go-review.googlesource.com/c/go/+/185258
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-07-08 18:32:58 +00:00
Alexander Rakoczy
0fddd66867 doc: document Go 1.11.12
Change-Id: I1b2e369befc58b3f88ac201442a2d9f76d87d54e
Reviewed-on: https://go-review.googlesource.com/c/go/+/185257
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-07-08 18:21:41 +00:00
Mohit Agarwal
e94472a369 doc/go1.13: fix links and a closing tag
- fix link for `Time.Format`
- fix closing tag for `go get`
- add links for `runtime.Caller`, `runtime.Callers`
- remove link for `TypedArrayOf` since it has been removed (CL 177537)

Change-Id: I1dc38226e6d91c68fbd2f02c1acfad5327f4ebe8
Reviewed-on: https://go-review.googlesource.com/c/go/+/185038
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-07-05 00:44:51 +00:00
Tobias Klauser
e2fdce9f16 doc/go1.13: fix typo
Change-Id: I99e76c0c12050289be5b353595eb21fbabe7c01e
Reviewed-on: https://go-review.googlesource.com/c/go/+/184597
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-07-03 07:14:40 +00:00
Diogo Pinela
67f181bfd8 doc: fix spec links in Go 1.13 release notes
When reading tip.golang.org/doc/go1.13.html, the spec links in
the "Changes to the language" section should point to the updated
spec, not the old one.

Change-Id: I6b13ca0b4c722ed52b84a12a680bece876a4e478
Reviewed-on: https://go-review.googlesource.com/c/go/+/184118
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-06-27 22:31:35 +00:00
Bryan C. Mills
ab94ebbdcd doc/go1.13: make cmd/go paragraphs more concise
Looking at the live release notes on tip.golang.org, the Modules
section is much more verbose than the other sections.

To some extent that's to be expected, but too much detail in the
release notes might discourage folks from consulting the actual
documentation. Ensure that topics have clear links and omit
unnecessary details.

Change-Id: I1ccbc1697fccaf7ca7094c606bd11696c46d87f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/183987
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-06-26 20:12:13 +00:00
Jay Conrod
fc26cbacff doc/go1.13: describe new 'go version' behavior
Change-Id: I18e2546f89e68e77d6e829acc997851751a44f0c
Reviewed-on: https://go-review.googlesource.com/c/go/+/183983
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-26 20:10:05 +00:00
Bryan C. Mills
06f709a04a doc/go1.13: move 'go get -t' paragraph to be adjacent to 'go get -u' changes
As suggested by thepudds in CL 183630.

Also adjust the paragraph to harmonize the transitions between the
newly-adjacent paragraphs.

Change-Id: Ie85abea946db81804c1995d27be4951d5db6b812
Reviewed-on: https://go-review.googlesource.com/c/go/+/183918
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-06-26 18:38:59 +00:00
Bryan C. Mills
b21c837008 doc/go1.13: describe the change in behavior of GO111MODULE=auto
Updates #31857

Change-Id: Id0dc66246f768a2c730c67cd7a4a7830547f22a8
Reviewed-on: https://go-review.googlesource.com/c/go/+/183922
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Reviewed-by: Katie Hockman <katie@golang.org>
2019-06-26 18:35:40 +00:00
Jay Conrod
8382ccb0bc doc/go1.13: binary-only package are no longer supported
Change-Id: Ieb4a78730a0685627b4730381b72cbd01031c8fa
Reviewed-on: https://go-review.googlesource.com/c/go/+/183633
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-25 19:41:54 +00:00
Dmitri Shuralyov
fa0537b8af doc/go1.13: close <em> and <code> tags
Fixup for two typos from CL 183630.

Change-Id: I7968a736680e8a6bbd1f4691d443b217702bc190
Reviewed-on: https://go-review.googlesource.com/c/go/+/183843
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-25 19:10:58 +00:00
Bryan C. Mills
53a42d3c4a doc/go1.13: describe new cmd/go environment variables
Change-Id: I99669339b816a3ae56bbe082a8c47ae17e763d71
Reviewed-on: https://go-review.googlesource.com/c/go/+/183632
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-06-25 17:52:51 +00:00
Bryan C. Mills
816ce1a23a doc/go1.13: describe 'go env -w'
Change-Id: I0c8c30b40a33763dc34f15d144346eb1a0997df2
Reviewed-on: https://go-review.googlesource.com/c/go/+/183631
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-06-25 17:51:54 +00:00
Bryan C. Mills
a6ad626bac doc/go1.13: describe changes to 'go get'
Also fix up markup in the “Version validation” section to correct
indentation on Chrome.

Change-Id: Ib930d324567c086bbd0c67b105272bdfcca77b12
Reviewed-on: https://go-review.googlesource.com/c/go/+/183630
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-06-25 17:51:25 +00:00
Andrew
98e1bd2b79 doc/go1.13: add release notes for the errors package
Also removes remaining TODOs

Change-Id: Id80021b7a64c923c4ebd69fb6e8831a43a76dc72
Reviewed-on: https://go-review.googlesource.com/c/go/+/183625
Reviewed-by: Katie Hockman <katie@golang.org>
2019-06-25 15:52:31 +00:00
Filippo Valsorda
5f7e9cedd2 doc/go1.13: cmd/go, math/big, and a leftover crypto/x509 release note
Change-Id: I80f2b50c8dd3d3f0fea6ed25fa2581786152d470
Reviewed-on: https://go-review.googlesource.com/c/go/+/183621
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-24 21:26:46 +00:00
Ian Lance Taylor
122a4fb7b0 doc/go1.13: mention {NetBSD,OpenBSD}/arm64 ports
Also alphabetize port listing.

Change-Id: I4cc552a74856c9955571d721deb6223438c7d856
Reviewed-on: https://go-review.googlesource.com/c/go/+/183637
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-06-24 18:34:09 +00:00
Andrew
fafc92d4a6 doc/go1.13: remove bytes TODO since it does not require a release note
Change-Id: I8c19c6df6fec74dcc8c3bfdc667576ea00e86ec1
Reviewed-on: https://go-review.googlesource.com/c/go/+/183617
Reviewed-by: Katie Hockman <katie@golang.org>
2019-06-24 18:23:08 +00:00
Dmitri Shuralyov
c11f6c4929 doc: add release notes for godoc and go doc
Updates #30029
Updates #31457

Change-Id: I08414a544615e74afb47f7a10a00f1e22adfd40c
Reviewed-on: https://go-review.googlesource.com/c/go/+/182619
Reviewed-by: Katie Hockman <katie@golang.org>
2019-06-21 21:24:47 +00:00
Bryan C. Mills
1803ab1e44 cmd/go: validate pseudo-versions against module paths and revision metadata
Previously, most operations involving pseudo-versions allowed any
arbitrary combination of version string and date, and would resolve to
the underlying revision (typically a Git commit hash) as long as that
revision existed.

There are a number of problems with that approach:

• The pseudo-version participates in minimal version selection. If its
  version prefix is inaccurate, the pseudo-version may appear to have
  higher precedence that the releases that follow it, effectively
  “pinning” the module to that commit. For release tags, module
  authors are the ones who make the decision about release tagging;
  they should also have control over the pseudo-version precedence
  within their module.

• The commit date within the pseudo-version provides a total order
  among pseudo-versions. If it is not accurate, the pseudo-version
  will sort into the wrong place relative to other commits with the
  same version prefix.

To address those problems, this change restricts the pseudo-versions
that the 'go' command accepts, rendering some previously
accepted-but-not-canonical versions invalid. A pseudo-version is now
valid only if all of:

1. The tag from which the pseudo-version derives points to the named
   revision or one of its ancestors as reported by the underlying VCS
   tool, or the pseudo-version is not derived from any tag (that is,
   has a "vX.0.0-" prefix before the date string and uses the lowest
   major version appropriate to the module path).

2. The date string within the pseudo-version matches the UTC timestamp
   of the revision as reported by the underlying VCS tool.

3. The short name of the revision within the pseudo-version (such as a
   Git hash prefix) is the same as the short name reported by the
   underlying cmd/go/internal/modfetch/codehost.Repo. Specifically, if
   the short name is a SHA-1 prefix, it must use the same number of
   hex digits (12) as codehost.ShortenSHA1.

4. The pseudo-version includes a '+incompatible' suffix only if it is
   needed for the corresponding major version, and only if the
   underlying module does not have a go.mod file.

We believe that all releases of the 'go' tool have generated
pseudo-versions that meet these constraints. However, a few
pseudo-versions edited by hand or generated by third-party tools do
not. If we discover invalid-but-benign pseudo-versions in widely-used
existing dependencies, we may choose to add a whitelist for those
specific path/version combinations.

―

To work around invalid dependencies in leaf modules, users may add a
'replace' directive from the invalid version to its valid equivalent.
Note that the go command's go.mod parser automatically resolves commit
hashes found in 'replace' directives to the appropriate
pseudo-versions, so in most cases one can write something like:

	replace github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c => github.com/docker/docker e7b5f7dbe98c

and then run any 'go' command (such as 'go list' or 'go mod tidy') to
resolve it to an appropriate pseudo-version. Note that the invalid
version will still be used in minimal version selection, so this use
of 'replace' directives is an incomplete workaround.

―

One of the common use cases for higher-than-tagged pseudo-versions is
for projects that do parallel development on release branches. For
example, if a project cuts a 'v1.2' release branch at v1.2.0, they may
want future commits on the main branch to show up as pre-releases for
v1.3.0 rather than for v1.2.1 — especially if v1.2.1 is already tagged
on the release branch. (On the other hand, a backport of a patch to
the v1.2 branch should not show up as a pre-release for v1.3.0.)

To address this use-case, module authors can make use of our existing
support for pseudo-versions derived from pre-release tags: if the
author adds an explicit pre-release tag (such as 'v1.3.0-devel') to
the first commit after the branch, then the pseudo-versions for that
commit and its descendents will be derived from that tag and will sort
appropriately in version selection.

―

Updates #27171
Fixes #29262
Fixes #27173
Fixes #32662
Fixes #32695

Change-Id: I0d50a538b6fdb0d3080aca9c9c3df1040da1b329
Reviewed-on: https://go-review.googlesource.com/c/go/+/181881
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-06-21 21:02:09 +00:00
Robert Griesemer
b5a8dcb0d2 doc/go1.13: document changes to gofmt, go/* libs, and fix entry for text/scanner
Change-Id: I2230a97c681406f248b7f2fff45dd80a4b54a4b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/183357
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-21 01:21:26 +00:00
Andrew
832959ffcc doc/go1.13: add release notes for the testing package
Change-Id: I4ddbe22061579383ca47e14d0b64a74365fb3d19
Reviewed-on: https://go-review.googlesource.com/c/go/+/182797
Reviewed-by: Katie Hockman <katie@golang.org>
2019-06-19 21:14:12 +00:00
Austin Clements
0ab1cc33ef doc/go1.13: expand ports, add skeleton language changes section
Change-Id: I6338bba2a86fb27421f91203a04b39830bae1e52
Reviewed-on: https://go-review.googlesource.com/c/go/+/182800
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-19 19:37:19 +00:00
Robert Griesemer
7119f4b030 doc/go1.13: add release notes for language changes
Change-Id: I17b156e77f279e1387ad27ab0e41ae8f50c9a325
Reviewed-on: https://go-review.googlesource.com/c/go/+/182857
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
2019-06-19 18:13:09 +00:00
Filippo Valsorda
c82e7e7a88 doc/go1.13: add crypto-related release notes
Change-Id: I05d4ff3d3a31f56c9ceebdaceb39535a1351b26a
Reviewed-on: https://go-review.googlesource.com/c/go/+/182701
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-06-18 22:21:45 +00:00
Andrew
cb0f0d6cf1 doc/go1.13: add release notes for the net package
Change-Id: I54dc8afc33d6f8946d2c79b0339118fa3710a688
Reviewed-on: https://go-review.googlesource.com/c/go/+/182618
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-18 19:30:06 +00:00
Austin Clements
bd7d1bb8f3 doc/go1.13: runtime release notes, some compiler release notes
Change-Id: Icc5083a3de0c6b737bfc20b573ed785651910148
Reviewed-on: https://go-review.googlesource.com/c/go/+/182461
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-06-18 16:36:41 +00:00
Josh Bleecher Snyder
52572afa20 reflect,doc: use "the" instead of "a" in IsZero docs
There is a subtle distinction between a value
*being* the zero value vs being *equal to* the zero value.
This was discussed at length in #31450.

Using "a zero value" in the docs suggests that there may
be more than zero value. That is possible on the "equal to
zero value" reading, but not the "is zero" reading that we
selected for the semantics of IsZero.

This change attempts to prevent any confusion on this front by
switching to "the zero value" in the documentation.

And while we're here, eliminate a double-space.
(Darn macbook keyboards.)

Change-Id: Iaa02ba297438793f5a90be9919a4d53baef92f8e
Reviewed-on: https://go-review.googlesource.com/c/go/+/182617
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-06-18 15:08:08 +00:00
Steve Mynott
bc27b64dba doc: remove a Google+ link since it doesn't exist anymore
Change-Id: I692229a5597a6114a7f4261f7b59c58bf20f3e2b
GitHub-Last-Rev: ab173354ca
GitHub-Pull-Request: golang/go#32660
Reviewed-on: https://go-review.googlesource.com/c/go/+/182677
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-06-18 03:41:59 +00:00
Keith Randall
2f387ac1f3 doc: update 1.13 release notes
Write release notes for a few reflect, runtime, and syscall changes.

The init randomization has been reverted.

Change-Id: Idae481ca015e325eb7302abaa15b2792312f4c32
Reviewed-on: https://go-review.googlesource.com/c/go/+/181577
Reviewed-by: Austin Clements <austin@google.com>
2019-06-17 21:18:44 +00:00
Jay Conrod
530097fe60 cmd/go: document GOBIN and 'go install' locations
* In doc/install-source.html, clarify the meaning of $GOBIN and
  describe where executables from the Go distribution are
  installed. Also describe $GOPATH, since it provides a default value
  for $GOBIN and may conflict with $GOROOT.
* Add more detail to 'go help install' as well.

Fixes #31576

Change-Id: Ib8a8c21677c3aa0ebef97a3b587b6f8fe338b80e
Reviewed-on: https://go-review.googlesource.com/c/go/+/182341
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-17 17:28:00 +00:00
Katie Hockman
f18aeb3a54 doc: release notes for syscall and syscall/js
Change-Id: I0ee4b4f0211cd12803ab33976669350d9dd615f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/181944
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-06-14 19:37:52 +00:00
Julie
9838f4dfb4 doc: add release notes for log
Change-Id: Ifd330053094c172b7dcd9086da173289efc7f9b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/181942
Reviewed-by: Katie Hockman <katie@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-06-14 18:41:07 +00:00
Julie
80f89133ea doc: add release notes for context
Change-Id: I4c52d9bcf941810dbdfdd39e7f339c8283d6bcc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/181937
Reviewed-by: Katie Hockman <katie@golang.org>
2019-06-14 16:46:12 +00:00
Katie Hockman
f83c44e031 doc: clarify default go command behavior in the release notes
Change-Id: I2a0bd295ad9737581d149a7165191b878ae2acda
Reviewed-on: https://go-review.googlesource.com/c/go/+/181880
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 17:12:09 +00:00
Julie
b388d6868f doc: add release notes for reflect
Change-Id: I71a6816f54f8ad0f8531bb3f9de552fd136a0ed4
Reviewed-on: https://go-review.googlesource.com/c/go/+/181943
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 03:58:18 +00:00
Julie
418c7d8174 doc: release notes for html/template
Change-Id: Ifdc3c5b840e6833f14c8e52948e45d5faa5a0615
Reviewed-on: https://go-review.googlesource.com/c/go/+/181940
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 03:58:11 +00:00
Dmitri Shuralyov
0b6e3bf4ec doc: mention os.UserConfigDir in release notes
This change makes the release notes for Go 1.13 more complete
by mentioning a new function in the os package.

Change-Id: I0d637fd70ff6d14782bbfb7c13985a0f83b19d6d
Reviewed-on: https://go-review.googlesource.com/c/go/+/181945
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 01:26:12 +00:00
Katie Hockman
c0c6cee6aa doc: release notes for text/scanner and text/template
Change-Id: Ib5417cc48959b03befb1579da3281415a11ede9f
Reviewed-on: https://go-review.googlesource.com/c/go/+/181879
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-06-12 22:17:38 +00:00
Julie
87367cf86a doc: add release notes for database/sql
Change-Id: I032a3342c3ac899a39d357420b981b6f281518f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/181939
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
2019-06-12 17:46:55 +00:00
Katie Hockman
6a4b1f745d doc: add release notes for sync
Change-Id: I49b09349a632a6b6219c85638d9cb6774c0c210a
Reviewed-on: https://go-review.googlesource.com/c/go/+/181721
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-12 17:10:31 +00:00
Andrew Bonventre
65f53da8e8 doc: add release notes for the bytes, strings, and time packages
Change-Id: Idb5bf2a61bff635e3ebd926bdeacf943578ac874
Reviewed-on: https://go-review.googlesource.com/c/go/+/181681
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-12 14:58:18 +00:00
Katie Hockman
d36452eb56 doc: add release notes describing the default mirror and sumdb
Change-Id: I4923f0726ae0261a7c7b0f85e7433ae0f605c123
Reviewed-on: https://go-review.googlesource.com/c/go/+/181738
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-11 19:25:20 +00:00
Andrew Bonventre
5f94d44722 doc: add release notes for os and os/exec
Change-Id: I34fd45ee252474c12f2e9c8d9b1a75b9eabb57f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/181549
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-11 17:29:22 +00:00
Dmitri Shuralyov
ef84fa082c doc: document Go 1.12.6
Change-Id: I8ae00d2392c20c627d58cf7e79015e982b971802
Reviewed-on: https://go-review.googlesource.com/c/go/+/181551
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2019-06-10 23:23:39 +00:00
Dmitri Shuralyov
5545301697 doc: document Go 1.11.11
Change-Id: I1c3e3305dfee4545a6caedd48243770ab3b28277
Reviewed-on: https://go-review.googlesource.com/c/go/+/181550
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2019-06-10 23:21:57 +00:00
Andrew Bonventre
5ce1819cca doc, net/http: add release notes for net/http and fix doc comments
Change-Id: I684e3522e387b2d96d5cfb2878d2f77bf4558443
Reviewed-on: https://go-review.googlesource.com/c/go/+/181545
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-10 20:32:36 +00:00
Ian Lance Taylor
195e7538ba doc: remove CL 159258 from 1.13 release notes list
It was rolled back.

Change-Id: I8372bb7e11bab7be242f4af7093a73d2fa093067
Reviewed-on: https://go-review.googlesource.com/c/go/+/180760
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-06-05 17:25:56 +00:00
Andrew Bonventre
9ab9ca27bb doc: update Go 1.13 release notes using relnote
The additions were generated using golang.org/x/build/cmd/relnote.

Change-Id: Ie7322f7d01a2dd4a7bca89b9ef9c1ce93bc2671a
Reviewed-on: https://go-review.googlesource.com/c/go/+/180778
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-06-05 16:33:20 +00:00
Agniva De Sarker
8343a0934d doc: fix missing anchor links in contribute.html
Some <h3>s were missing ids due to which the anchor links
weren't getting generated.

Fixes #32415

Change-Id: Ica21425c1a7c49735231c1de96b6c77dd594ce64
Reviewed-on: https://go-review.googlesource.com/c/go/+/180397
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-04 15:30:33 +00:00
Robert Griesemer
1e3ffb0c90 spec: clarify that slice a expression shares underlying array with operand
The spec was not very precise as to what happens with respect to sharing
if a sliced operand is (a pointer to) an array. Added a small clarification
and a supporting example.

Fixes #31689.

Change-Id: Ic49351bec2033abd3f5428154ec3e9a7c2c9eaa5
Reviewed-on: https://go-review.googlesource.com/c/go/+/177139
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2019-05-14 22:30:48 +00:00
Robert Griesemer
eebb9db0ef spec: clarify the difference between &T{} and new(T)
Add a small paragraph and example pointing out
the difference for the case where T is a slice
or map. This is a common error for Go novices.

Fixes #29425.

Change-Id: Icdb59f25361e9f6a09b190fbfcc9ae0c7d90077b
Reviewed-on: https://go-review.googlesource.com/c/go/+/176338
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2019-05-13 21:24:51 +00:00
Robert Griesemer
451cf3e2cd spec: clarify language on package-level variable initialization
The very first paragraph on "Package initialization" stated that
"variables are initialized in declaration order, but after any
variables they might depend on". This phrasing was easily
misread as "declaration order is the first sorting criteria"
and then contradicted what the subsequent paragraphs spelled
out in precise detail.

Instead, variable initialization proceeds by repeatedly determining
a set of ready to initialize variables, and then selecting from that
set the variable declared earliest. That is, declaration order is the
second sorting criteria.

Also, for the purpose of variable initialization, declarations
introducing blank (_) variables are considered like any other
variables (their initialization expressions may have side-effects
and affect initialization order), even though blank identifiers
are not "declared".

This CL adds clarifying language regarding these two issues
and the supporting example.

Both gccgo and go/types implement this behavior. cmd/compile
has a long-standing issue (#22326).

The spec also did not state in which order multiple variables
initialized by a single (multi-value) initialization expression are
handled. This CL adds a clarifying paragraph: If any such variable
is initialized, all that declaration's variables are initialized at
the same time.

This behavior matches user expectation: We are not expecting to
observe partially initialized sets of variables in declarations
such as "var a, b, c = f()".

It also matches existing cmd/compile and go/types (but not gccgo)
behavior.

Finally, cmd/compile, gccgo, and go/types produce different
initialization orders in (esoteric) cases where hidden (not
detected with existing rules) dependencies exist. Added a
sentence and example clarifying how much leeway compilers have
in those situations. The goal is to preserve the ability to
use static initialization while at the same time maintain
the relative initialization order of variables with detected
dependencies.

Fixes   #31292.
Updates #22326.

Change-Id: I0a369abff8cfce27afc975998db875f5c580caa2
Reviewed-on: https://go-review.googlesource.com/c/go/+/175980
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2019-05-13 20:57:02 +00:00
Shulhan
c2f7dd182e doc: use consistent path in example code
Previous section of documentation said that if GOPATH is not set then
it will be default to "$HOME/go", not "$HOME/work".

This change fix the path in example code to "$HOME/go", and while at it
fix the output of git command after commit.

Change-Id: Ifedca6c3997efd07e865c27b7321d755acad0254
Reviewed-on: https://go-review.googlesource.com/c/go/+/175258
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-05-13 16:34:24 +00:00
Russ Cox
bc0c077094 doc: update /doc/asm compiler output example
The compiler output shown in the doc is now quite old
(most of the changes happened in Go 1.5).
Update it to be more like what users will actually see.

Also explain how to get literal machine code again.

Prompted by #30968.

Change-Id: I0ce139c3fe299ccc43e85b6aca81c6e0aac1a2df
Reviewed-on: https://go-review.googlesource.com/c/go/+/175757
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2019-05-08 15:21:11 +00:00
Andrew Bonventre
1560264f70 doc: document Go 1.12.5
Change-Id: I9986a323db2a8f5fa74b071cfd04e8c786da0cb3
Reviewed-on: https://go-review.googlesource.com/c/go/+/175438
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-06 20:11:45 +00:00
Andrew Bonventre
e1f9e701be doc: document Go 1.11.10
Change-Id: Icca4495f727e3921b717a4bbb441cd832d321d46
Reviewed-on: https://go-review.googlesource.com/c/go/+/175439
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-06 20:09:58 +00:00
Russ Cox
2316784f67 doc/go1.13: start doc, note macOS, FreeBSD deprecations
For #23011.
For #27619.

Change-Id: Id1f280993ecdfb07a7420926ca1c0f5b7872afbb
Reviewed-on: https://go-review.googlesource.com/c/go/+/174521
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-05-02 14:04:56 +00:00
Haosdent Huang
8c1f78524e runtime: support all as parameter in gdb goroutine commands.
For example, can use `goroutine all bt` to dump all goroutines'
information.

Change-Id: I51b547c2b837913e4bdabf0f45b28f09250a3e34
GitHub-Last-Rev: d04dcd4f58
GitHub-Pull-Request: golang/go#26283
Reviewed-on: https://go-review.googlesource.com/c/go/+/122589
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: David Chase <drchase@google.com>
2019-04-29 18:11:11 +00:00
Brandon Ryan
06a8f68407 doc: clarify to use MinGW-W64 for amd64 systems
Fixes #19686

Change-Id: I5c2dd60636b521425647afd0725fdd7c18e7bbbe
GitHub-Last-Rev: a1c5f56940
GitHub-Pull-Request: golang/go#31682
Reviewed-on: https://go-review.googlesource.com/c/go/+/173997
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-26 15:09:02 +00:00
Benny Siegert
d0fadb93c2 doc: update wording in contribution guide
The top right menu in Gerrit is now a gear icon, and the link
has a slightly different title.

Change-Id: I3f5d194f31ad09a99416a45db392aa4b5c7d98ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/173400
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-23 14:39:25 +00:00
Dmitry Savintsev
e47090ab40 doc: fix typo in go1.12 release notes
Change-Id: I3cb4fb7cacba51bfd611ade918f16c618e2569fd
Reviewed-on: https://go-review.googlesource.com/c/go/+/172159
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-16 14:47:58 +00:00
Daniel Langner
90458ec80e doc/go_faq: fix grammar
Change-Id: Idbd6c97d754e3565aeade4d9e8011a76e8da19c2
GitHub-Last-Rev: 22e917e5ca
GitHub-Pull-Request: golang/go#31439
Reviewed-on: https://go-review.googlesource.com/c/go/+/171885
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-12 15:22:53 +00:00
Brad Fitzpatrick
ab2a080338 doc: document Go 1.12.4 and Go 1.11.9
Updates #31293

Change-Id: I3d72f732be7b28059310ea6fc134c3bfac81492d
Reviewed-on: https://go-review.googlesource.com/c/go/+/171578
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-04-11 21:10:16 +00:00
Andrew Bonventre
973c0312e3 doc: correct link in 1.12.3 notes
Change-Id: I6dd60ea7b8a8756be97503e163c2386af16e4e12
Reviewed-on: https://go-review.googlesource.com/c/go/+/171144
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-08 20:13:20 +00:00
Andrew Bonventre
6f512c8d66 doc: correct link in 1.11.8 notes
Change-Id: I09e0c2720ec0a51dc73c24b4550a749448656025
Reviewed-on: https://go-review.googlesource.com/c/go/+/171143
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-08 20:10:30 +00:00
Andrew Bonventre
739a78f2b8 doc: document Go 1.11.8
Change-Id: Ia06f7005f466e55a22c76bf2b47d74ee8eb77dd1
Reviewed-on: https://go-review.googlesource.com/c/go/+/171139
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-08 20:06:15 +00:00
Andrew Bonventre
8759b4d384 doc: document Go 1.12.3
Change-Id: I84c9a8ddbd3101dd478e4a8a4e191863e68c6af6
Reviewed-on: https://go-review.googlesource.com/c/go/+/171140
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-08 20:03:55 +00:00
Andrew Bonventre
e47ced7857 doc: document Go 1.11.7
Change-Id: Iec5e69b3ea163f42234d3b73696427a7aa8732e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/170884
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-05 18:34:48 +00:00
Andrew Bonventre
5ec938cdcf doc: document Go 1.12.2
Change-Id: I990c451ff24844b39dee2477cec4caa9db2e8ebb
Reviewed-on: https://go-review.googlesource.com/c/go/+/170883
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-05 18:34:43 +00:00
Richard Musiol
cf8cc7f63c cmd/compile: add saturating conversions on wasm
This change adds the GOWASM option "satconv" to enable the generation
of experimental saturating (non-trapping) float-to-int conversions.
It improves the performance of the conversion by 42%.

Previously the conversions had already been augmented with helper
functions to have saturating behavior. Now Wasm.rules is always using
the new operation names and wasm/ssa.go is falling back to the helpers
if the feature is not enabled.

The feature is in phase 4 of the WebAssembly proposal process:
https://github.com/WebAssembly/meetings/blob/master/process/phases.md

More information on the feature can be found at:
https://github.com/WebAssembly/nontrapping-float-to-int-conversions/blob/master/proposals/nontrapping-float-to-int-conversion/Overview.md

Change-Id: Ic6c3688017054ede804b02b6b0ffd4a02ef33ad7
Reviewed-on: https://go-review.googlesource.com/c/go/+/170119
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-04-04 16:10:12 +00:00
Richard Musiol
4d23cbc671 cmd/compile: add sign-extension operators on wasm
This change adds the GOWASM option "signext" to enable
the generation of experimental sign-extension operators.

The feature is in phase 4 of the WebAssembly proposal process:
https://github.com/WebAssembly/meetings/blob/master/process/phases.md

More information on the feature can be found at:
https://github.com/WebAssembly/sign-extension-ops/blob/master/proposals/sign-extension-ops/Overview.md

Change-Id: I6b30069390a8699fbecd9fb4d1d61e13c59b0333
Reviewed-on: https://go-review.googlesource.com/c/go/+/168882
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-28 20:23:05 +00:00
Richard Musiol
b434bbf197 cmd/go: add GOWASM environment variable
This change adds the environment variable GOWASM, which is a comma
separated list of experimental WebAssembly features that the compiled
WebAssembly binary is allowed to use. The default is to use no
experimental features. Initially there are no features avaiable.

More information about feature proposals can be found at
https://github.com/WebAssembly/proposals

Change-Id: I4c8dc534c99ecff8bb075dded0186ca8f8decaef
Reviewed-on: https://go-review.googlesource.com/c/go/+/168881
Run-TryBot: Richard Musiol <neelance@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-23 20:33:57 +00:00
Andrew Bonventre
032acb3a1f doc: add minor revisions header for 1.12
Change-Id: I0d4a55af0bee754ab1ee817780027e9f72475afb
Reviewed-on: https://go-review.googlesource.com/c/go/+/167711
Reviewed-by: Katie Hockman <katiehockman@google.com>
Reviewed-by: Katie Hockman <katie@golang.org>
2019-03-14 20:47:31 +00:00
Andrew Bonventre
f832a97e45 doc: document Go 1.12.1
Change-Id: I6d3a615c5f72e9aa29d23e127af98d6e836da173
Reviewed-on: https://go-review.googlesource.com/c/go/+/167699
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-14 18:10:46 +00:00
Andrew Bonventre
d3bb45d904 doc: document Go 1.11.6
Change-Id: I99832fa4f2c3ec28e2dad46cf7607f3766948031
Reviewed-on: https://go-review.googlesource.com/c/go/+/167698
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-14 18:07:21 +00:00
Robert Griesemer
1024b25d0c spec: clarify wording on passing slice arguments to variadic functions
Per discussion on #30769.

Fixes #30769.

Change-Id: I620dbac936de1a0b5deec03926dd11d690a918e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/167380
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Rob Pike <r@golang.org>
2019-03-14 00:32:43 +00:00
Carlos Eduardo Seo
4ba69a9a17 cmd/compile: add processor level selection support to ppc64{,le}
ppc64{,le} processor level selection allows the compiler to generate instructions
targeting newer processors and processor-specific optimizations without breaking
compatibility with our current baseline. This feature introduces a new environment
variable, GOPPC64.

GOPPC64 is a GOARCH=ppc64{,le} specific option, for a choice between different
processor levels (i.e. Instruction Set Architecture versions) for which the
compiler will target. The default is 'power8'.

Change-Id: Ic152e283ae1c47084ece4346fa002a3eabb3bb9e
Reviewed-on: https://go-review.googlesource.com/c/go/+/163758
Run-TryBot: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
2019-03-13 14:44:02 +00:00
Robert Griesemer
a083648165 spec: document new Go2 number literals
This CL documents the new binary and octal integer literals,
hexadecimal floats, generalized imaginary literals and digit
separators for all number literals in the spec.

Added empty lines between abutting paragraphs in some places
(a more thorough cleanup can be done in a separate CL).

A minor detail: A single 0 was considered an octal zero per the
syntax (decimal integer literals always started with a non-zero
digit). The new octal literal syntax allows 0o and 0O prefixes
and when keeping the respective octal_lit syntax symmetric with
all the others (binary_lit, hex_lit), a single 0 is not automatically
part of it anymore. Rather than complicating the new octal_lit syntax
to include 0 as before, it is simpler (and more natural) to accept
a single 0 as part of a decimal_lit. This is purely a notational
change.

R=Go1.13

Updates #12711.
Updates #19308.
Updates #28493.
Updates #29008.

Change-Id: Ib9fdc6e781f6031cceeed37aaed9d05c7141adec
Reviewed-on: https://go-review.googlesource.com/c/go/+/161098
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-12 16:13:39 +00:00
Rob Pike
fd19bc64de doc: add missing paragraph break in Effective Go
A recent edit broke the flow; add a paragraph break when the subject
switches from maps to structs.

No changes in wording.

Change-Id: I5df88ec36b9d81931cfdbc684424440d01ac06d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/165917
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-07 04:46:03 +00:00