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

2963 Commits

Author SHA1 Message Date
fanzha02
9f10d28304 cmd/internal/obj/arm64: summarize the Go assembly syntax and the GNU syntax mapping rules
The patch rewrites the content of doc.go file. The file describes some
general rules of the mapping between Go assembly syntax and GNU syntax.
And it gives some Go assembly examples and corresponding GNU assembly
examples.

The patch changes the doc.go to use standard doc comment format so that
the link https://golang.org/cmd/internal/obj/arm64/ can display it.

Assembly document framework is mainly contributed by Eric Fang <Eric.Fang@arm.com>
Documentation work is contributed by Eric Fang and Fannie Zhang <Fannie.Zhang@arm.com>

Change-Id: I8b3f6d6c6b91afdc2c44602e8f796beea905085e
Reviewed-on: https://go-review.googlesource.com/102055
Reviewed-by: Rob Pike <r@golang.org>
2018-04-20 01:40:35 +00:00
Rob Pike
aba0775ad8 doc/contribute.html: adjust wording from previous CL
The previous CL, 107197, overclarified the need for short subject
lines. Tweak the wording to be a guideline (keep it short) rather
than a limit (76 characters), which is more the Go way.

Also be strict about avoiding markup language.

Change-Id: I0da1132db8d86052647d96f1caac60289f2209ce
Reviewed-on: https://go-review.googlesource.com/107378
Reviewed-by: Mohit Bajoria <mohitbajo36@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-04-16 22:12:29 +00:00
Felix Kollmann
89d576c933 doc: clarify package uninstall/clean command
Fixes #24864

Change-Id: Iaffd23b368aff663bfc09a4e6277c01e7b5ea48d
GitHub-Last-Rev: 98e39b7bff
GitHub-Pull-Request: golang/go#24865
Reviewed-on: https://go-review.googlesource.com/106986
Reviewed-by: Giovanni Bajo <rasky@develer.com>
Reviewed-by: Rob Pike <r@golang.org>
2018-04-16 19:54:55 +00:00
Alberto Donizetti
7b7affa56d doc: use past releases in Release Policy explanation
As suggested by Ian on the issue, just use past releases to avoid any
confusion regarding current and future releases.

Fixes #23891

Change-Id: Ie513cd3e15aa04822898be57f71976e6fe6bd816
Reviewed-on: https://go-review.googlesource.com/107078
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-04-16 16:20:11 +00:00
mbj36
1898fce1e7 doc: improve commit messages
Fixes #24852

Change-Id: I71d0d7f75108bf4ad606733a45bb71baa66a4e91
Reviewed-on: https://go-review.googlesource.com/107197
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
Reviewed-by: Giovanni Bajo <rasky@develer.com>
2018-04-16 11:44:28 +00:00
Rob Pike
cf7760360e doc/install.html: address comments from review of previous edit
Point out that one can just run the commands now; it's not necessary
to log out first.

Change-Id: I48d0cc0273d97ba54ce59b3a3bbcae0b5af9aaef
Reviewed-on: https://go-review.googlesource.com/106195
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-04-11 05:24:49 +00:00
Jeremy Schlatter
338ac2af6f doc: switch from spaces to tabs for indentation in example code
This is the standard that gofmt uses.

Change-Id: I30e70611ccd0d3bbaa500fa84e9d1ba75970f0bc
GitHub-Last-Rev: b2b7af0df9
GitHub-Pull-Request: golang/go#24802
Reviewed-on: https://go-review.googlesource.com/106123
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-04-11 04:30:47 +00:00
Daniel Martí
53c8f6161c doc: add a note about loading profile files
If one is somewhat new to the command line or shell, it might be
surprising that changes applied to a file like $HOME/.profile will
seemingly not take effect, even if new shells are started.

Add a note about how shells usually only load these when the user logs
into a machine, to minimize the amount of people stuck and confused by
this.

Fixes #24756.

Change-Id: Ic68d8c97933f3f080b151a107633ecad76a163a4
Reviewed-on: https://go-review.googlesource.com/105557
Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2018-04-09 19:41:38 +00:00
Andrew Bonventre
cc936d12bd doc: update 1.9.5 release notes to include net/http/pprof
Change-Id: I7c0716711a2cadd347fdf242c792b109539f7355
Reviewed-on: https://go-review.googlesource.com/103163
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-03-29 01:26:37 +00:00
Andrew Bonventre
03d1dd8c2a doc: update release notes for Go 1.9.5
Change-Id: Idf88d289bac9603d852a9d19eb4b764f8589f8d9
Reviewed-on: https://go-review.googlesource.com/103159
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-03-29 01:12:23 +00:00
Andrew Bonventre
2f14fc9c68 doc: document Go 1.9.5
Change-Id: I8f12b188d2e13555e1d7634b9cc0319fc737cb1d
Reviewed-on: https://go-review.googlesource.com/103216
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-28 22:16:20 +00:00
Andrew Bonventre
bdbd8ed36b doc: document Go 1.10.1
Change-Id: Ibba5d4fd8124db9b1e4e50b8f37366f8dd23f47e
Reviewed-on: https://go-review.googlesource.com/103217
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-28 22:16:16 +00:00
Giovanni Bajo
a3d8326993 doc: first version of new contribute guide
I've reorganized the guide and rewritten large sections.

The structure is now more clear and logical, and can
be understood and navigated using the summary displayed at
the top of the page (before, the summary was confusing because
the guide contained H1s that were being ignored by the summary).

Both the initial onboarding process and the Gerrit
change submission process have been reworked to
include a concise checklist of steps that can be
read and understood in a few seconds, for people
that don't want or need to bother with details.
More in-depth descriptions have been moved into
separate sections, one per each checklist step.
This is by far the biggest improvement, as the previous
approach of having to read several pages just to understand
the requires steps was very scaring for beginners, in
addition of being harder to navigate.

GitHub pull requests have been integrated as a different
way to submit a change, suggested for first time contributors.

The review process has been described in more details,
documenting the workflow and the used conventions.

Most miscellanea have been moved into an "advanced
topics" chapter.

Paragraphs describing how to use git have been removed
to simplify reading. This guide should focus on Go contribution,
and not help users getting familiar with git, for which many
guides are available.

Change-Id: I6f4b76583c9878b230ba1d0225745a1708fad2e8
Reviewed-on: https://go-review.googlesource.com/93495
Reviewed-by: Rob Pike <r@golang.org>
2018-03-22 10:24:44 +00:00
Andrew Bonventre
7974f0815e Revert "doc: remove non-prime from list of primes in spec"
This reverts commit 4b06d9d727.

Reason for revert: It's a reference to a legendary article
from the Journal of Irreproducible Results.

Updates golang/go#24451

Change-Id: I0288177f4e286bd6ace5774f2e5e0acb02370305
Reviewed-on: https://go-review.googlesource.com/101495
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-03-19 21:51:23 +00:00
Andrew Bonventre
4b06d9d727 doc: remove non-prime from list of primes in spec
Fixes golang/go#24451

Change-Id: Id9b4cbd1a1ff032f1cc4606e9734ddcc64892ae5
Reviewed-on: https://go-review.googlesource.com/101457
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2018-03-19 18:26:12 +00:00
Rob Pike
1be58dcda8 doc/faq: add a Q&A about virus scanners
Fixes #23759.

Change-Id: I0407ebfea507991fc205f7b04bc5798808a5c5f6
Reviewed-on: https://go-review.googlesource.com/97496
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: David Symonds <dsymonds@golang.org>
2018-02-28 05:55:31 +00:00
unknown
e9c57bea11 net/http,doc: use HTTP status code constants where applicable
There are a few places where the integer value is used.
Use the equivalent constants to aid with readability.

Change-Id: I023b1dbe605340544c056d0e0d9d6d5a7d7d0edc
GitHub-Last-Rev: c1c90bcd25
GitHub-Pull-Request: golang/go#24123
Reviewed-on: https://go-review.googlesource.com/96984
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-26 05:04:31 +00:00
Yazen2017
a4e950ec9e doc: improve clarity of map index examples
The fourth example for map indexing states you have a map of type [K]V
and attempts to read in a variable of type T.  Further, the example
is meant to showcase the boolean return variable saying whether the
map contained a key, but overrides to type T.  This will not compile.

Changed last updated date to February 18

Fixes: #23895

Change-Id: I63c52adbcd989afd4855e329e6c727f4c01f7881
Reviewed-on: https://go-review.googlesource.com/94906
Reviewed-by: Robert Griesemer <gri@golang.org>
2018-02-19 05:48:39 +00:00
Kunpei Sakai
f356e83e2e all: remove "the" duplications
Change-Id: I1f25b11fb9b7cd3c09968ed99913dc85db2025ef
Reviewed-on: https://go-review.googlesource.com/94976
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-02-18 17:54:20 +00:00
Andrew Bonventre
549cb18a91 doc: update devel/release.html to add Go 1.10
Change-Id: I869f1607b0209ad190bc02999879f0682965fdf7
Reviewed-on: https://go-review.googlesource.com/94915
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-02-17 04:38:14 +00:00
Ian Lance Taylor
f2354d0aac doc: add note about invalid flag errors to 1.10 release notes
Updates #23672
Updates #23749

Change-Id: I85b6493bd1e4095398508b7ef395c35463dfbde1
Reviewed-on: https://go-review.googlesource.com/94158
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-16 00:27:49 +00:00
Ian Lance Taylor
229a8ce639 doc: remove draft notice from Go 1.10 release notes
Change-Id: I063b556b59ecb8a8f4a3f121c32982b90eee2d74
Reviewed-on: https://go-review.googlesource.com/94159
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-02-15 05:25:05 +00:00
Agniva De Sarker
32a0a1d37c doc/articles/wiki: highlight the use of _ warning
This moves the paragraph mentioning the use of _ higher up
to emphasize the warning and thereby reducing chances of getting
stuck.

Fixes #22617

Change-Id: I64352a3e966a22d86fc9d381332bade49d74714a
Reviewed-on: https://go-review.googlesource.com/87375
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-02-14 04:54:37 +00:00
Brad Fitzpatrick
caa7d854c8 doc: mention net/http Server Content-Type change
Updates #20784

Change-Id: Ic07c78a86da5026e407ac9ecb3117d320c198048
Reviewed-on: https://go-review.googlesource.com/82016
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-13 20:21:07 +00:00
Andrew Bonventre
4c4ce3dc79 all: restore changes from faulty merge/revert
This reverts commit 3b6abd8a45.

Change-Id: I8ca100501c1844af78a547989786d14dac6b494a
Reviewed-on: https://go-review.googlesource.com/93456
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-12 20:13:59 +00:00
Andrew Bonventre
3b6abd8a45 Revert "[release-branch.go1.10] all: merge master into release-branch.go1.10"
This reverts commit b83d7f7253.

Reason for revert: wrong branch

Change-Id: I28ebb121f7b3e331729e8a6a00961b876f3dd0f2
Reviewed-on: https://go-review.googlesource.com/93455
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-12 20:10:09 +00:00
Brad Fitzpatrick
74b56022a1 doc: note that x509 cert parsing rejects some more certs now
Fixes #23711
2018-02-12 15:01:02 -05:00
JBD
ee59f6dff2 doc: minor wording improvement to the diagnostics guide
Change-Id: I8469fbbb934f096f04ad68c592aacdb805b6d2d4
GitHub-Last-Rev: 6d2cfcc23d
GitHub-Pull-Request: golang/go#23754
Reviewed-on: https://go-review.googlesource.com/92996
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-02-09 01:22:35 +00:00
Russ Cox
104445e314 doc: document Go 1.9.4 and Go 1.8.7
Change-Id: I50928e7747f43858fc863b53cfb5b63e208d6932
Reviewed-on: https://team-review.git.corp.google.com/213447
Reviewed-by: Andrew Bonventre <andybons@google.com>
2018-02-07 19:22:09 +00:00
Ian Lance Taylor
fd7331a821 text/template: revert CL 66410 "add break, continue actions in ranges"
The new break and continue actions do not work in html/template, and
fixing them requires thinking about security issues that seem too
tricky at this stage of the release. We will try again for 1.11.

Original CL description:

    text/template: add break, continue actions in ranges

    Adds the two range control actions "break" and "continue". They act the
    same as the Go keywords break and continue, but are simplified in that
    only the innermost range statement can be broken out of or continued.

    Fixes #20531

Updates #20531
Updates #23683

Change-Id: Ia7fd3c409163e3bcb5dc42947ae90b15bdf89853
Reviewed-on: https://go-review.googlesource.com/92155
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2018-02-06 05:00:01 +00:00
Andrew Bonventre
4558321eb2 doc/editors: remove feature matrix for various editors/IDEs
The speed of feature development for these products outpaces the
standard Go 6-month release cycle tied to this page. The cost of
maintaining this list is becoming a burden as we make every
attempt at being impartial. As of this writing, we believe feature
lists belong on the pages of the editors/IDEs themselves.

Change-Id: Ie2dfe0e0d47d203c913373e58cbb65cb0fb14d0c
Reviewed-on: https://go-review.googlesource.com/91976
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-02-05 18:37:02 +00:00
Robert Griesemer
851e98f0ee spec: remove need for separate Function production (cleanup)
The EBNF production

	Function = Signature FunctionBody .

was used in FunctionDecl, MethodDecl, and FunctionLit, but only
for the latter it shortened the syntax slightly.

This change "inlines" Function which simplifies FunctionDecl and
MethodDecl and gets rid of the Function production.

This has no impact on the specified language. Also, the Function
production is never referred to by the prose, so it's safe to
remove it from the spec.

Finally, neither go/ast nor go/parser have a representation of
this production via a corresponding node or parse function, so
no possibly valuable documentation is lost, either.

Change-Id: Ia2875d31c6ec2d2079081ef481e50bad4f43c694
Reviewed-on: https://go-review.googlesource.com/91515
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2018-02-02 00:22:16 +00:00
Brad Fitzpatrick
bcc86d5f42 doc: add GOMIPS to source installation docs
Also close </li> tags.

Fixes #23614

Change-Id: Icabcd577ef7df43e54d2b0068ee54614ba65bea1
Reviewed-on: https://go-review.googlesource.com/90815
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2018-01-30 19:54:01 +00:00
Mohit Agarwal
d529aa93ea doc: fix the closing tag in contribute.html
Change-Id: I802bc11d90d414e7313dd11842a04fd6b591ea06
Reviewed-on: https://go-review.googlesource.com/90595
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-29 19:08:24 +00:00
Alberto Donizetti
f8610bbd5c doc: fix two small mistakes in 1.10 release notes
Change-Id: If928b14f6cd89b1d78745e8bc7a081ccbd7fd38f
Reviewed-on: https://go-review.googlesource.com/90515
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-29 18:34:00 +00:00
Kevin Burke
00587e8988 doc: fix spelling mistake
Change-Id: I7bf1a93d3377acccdd3a34c5dcef7863310496e0
Reviewed-on: https://go-review.googlesource.com/89955
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-26 23:55:04 +00:00
Daniel Theophanes
651ddbdb50 database/sql: buffers provided to Rows.Next should not be modified by drivers
Previously we allowed drivers to modify the row buffer used to scan
values when closing Rows. This is no longer acceptable and can lead
to data races.

Fixes #23519

Change-Id: I91820a6266ffe52f95f40bb47307d375727715af
Reviewed-on: https://go-review.googlesource.com/89936
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2018-01-25 19:14:14 +00:00
Sarah Adams
7350297eb6 doc: remove Sarah Adams from conduct working group contacts
Change-Id: Id2332332ba5ff5a3ae6e58882743aa25359c02f6
Reviewed-on: https://go-review.googlesource.com/89675
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-25 17:27:24 +00:00
Robert Griesemer
9b49ac0366 spec: consistently use "defined type" and "type name" (cleanup)
When we introduced the notion of alias type declarations, we renamed
"named type" to "defined type" to avoid confusion with types denoted
by aliases and thus are also types with names, or "named types".

Some of the old uses of "named types" remained; this change removes
them.

Now the spec consistently uses the terms:

- "defined type"  for a type declared via a type definition
- "type name"     for any name denoting an (alias or defined) type
- "alias"         for a type name declared in an alias declaration

New prose is encouraged to avoid the term "named type" to counter-
act further confusion.

Fixes #23474.

Change-Id: I5fb59f1208baf958da79cf51ed3eb1411cd18e03
Reviewed-on: https://go-review.googlesource.com/89115
Reviewed-by: Rob Pike <r@golang.org>
2018-01-23 17:39:18 +00:00
Russ Cox
4a2f28f51e doc, cmd/go: final release notes edits
Except for removing the DRAFT marker, I think these are now ready to go.

Change-Id: I20604f5b135616189a24990db463c7bb5e7d48f1
Reviewed-on: https://go-review.googlesource.com/88975
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-23 14:37:53 +00:00
Andrew Bonventre
6c27114ced doc: document Go 1.8.6
Update golang/go#23515

Change-Id: Id334d8663bf4cbb68f224d1bba4c9ad3855f8aae
Reviewed-on: https://go-review.googlesource.com/89155
Reviewed-by: Andrew Gerrand <adg@golang.org>
2018-01-23 02:15:53 +00:00
Andrew Bonventre
2923b209b3 doc: update 1.9.3 release date
Change-Id: I689ccfb8452a170629425dc97da503b28766c6f9
Reviewed-on: https://go-review.googlesource.com/89035
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-22 21:11:38 +00:00
Russ Cox
21a460d3ab doc/go1.10: address final TODOs
Change-Id: Id71c1ccb584fb308f1615c0ed1255cc8b44bf675
Reviewed-on: https://go-review.googlesource.com/88256
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-22 16:56:10 +00:00
Andrew Bonventre
3810f5bfed doc: change anchor URLs from golang.org/dl/ to /dl/
When running locally, it will redirect properly to golang.org/dl/
(see https://github.com/golang/tools/blob/master/cmd/godoc/dl.go).

This is to support domains in prod other than golang.org.

Change-Id: I6d3051fcd7e06a86442324a64d781d8ad95c624f
Reviewed-on: https://go-review.googlesource.com/88679
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-20 04:13:12 +00:00
Ian Lance Taylor
984e81f64e doc/faq: clarify that concurrent maps reads are safe
Fixes #23480

Change-Id: I33b4bdc60b9983ab62d87bfa0ae3ff33304269c0
Reviewed-on: https://go-review.googlesource.com/88515
Reviewed-by: Rob Pike <r@golang.org>
2018-01-20 01:58:21 +00:00
Andrew Bonventre
68ce117cf1 doc: document Go 1.9.3
Change-Id: Ic7a5d3118754b34ab0652fcef889259a03baebc3
Reviewed-on: https://go-review.googlesource.com/88536
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-19 23:36:32 +00:00
Robert Griesemer
18d527b3f0 spec: mention that special case for integer division is due to overflow
Fixes #23443.

Change-Id: If60c39b582ee5308e9fa902f93c1b6ae7890346c
Reviewed-on: https://go-review.googlesource.com/87975
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2018-01-17 18:59:44 +00:00
Alberto Donizetti
8f6e8f9efd doc: specify which pprof version was vendored in go1.10
Change-Id: I248cb10a2e24f089600c13e86da251970c773d95
Reviewed-on: https://go-review.googlesource.com/87662
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-16 08:20:51 +00:00
Robert Griesemer
c13e0e8cee spec: remove example explaining that type B0 and B0 are identical
Every few months we get a new error report claiming that there
is a typo in the spec related to this specific example. Clearly,
the fact that two types with the same identifier are identical
seems exceedingly obvious to readers; thus the example seems not
worth the trouble. Removing it.

For #9226.
For #22202.
For #22495.
For #23096.
For #23409.

There may be more.

Change-Id: I003ba79dc460ffb028a4ecb5f29efd60f2551912
Reviewed-on: https://go-review.googlesource.com/87417
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2018-01-11 21:04:11 +00:00
Andrew Bonventre
594668a5a9 doc, api: add type Srcset string change to go1.10 notes and API
Change-Id: I13afaa894292bd566510b40a5e4bbbe4d72d4d08
Reviewed-on: https://go-review.googlesource.com/87395
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-11 17:44:08 +00:00
Russ Cox
e7303a72db doc/go1.10: document that Go 1.11 will remove Windows XP support
Fixes #23380.

Change-Id: Ia9a086eada21b5561f110833afcf93e542a04407
Reviewed-on: https://go-review.googlesource.com/87175
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-01-10 19:53:26 +00:00
kim yongbin
dbdeeed02e doc/go1.10: fix typo of "preserves"
Change-Id: Ib5f5d20200284850c14c2431687bc102696ef8ae
Reviewed-on: https://go-review.googlesource.com/87215
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-10 17:14:31 +00:00
Russ Cox
23aefcd9ae doc/go1.10: fix more TODOs
Change-Id: I7be69a543841343a6ccbb335c7277009528fa0da
Reviewed-on: https://go-review.googlesource.com/87024
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-10 00:00:40 +00:00
Robert Griesemer
8c916a2f6d spec: use consistent quoting style in prose
Fixes #23389.

Change-Id: Id6e86eebe44809db12a0e14014c474bf4fbf5108
Reviewed-on: https://go-review.googlesource.com/87035
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-09 23:31:06 +00:00
Russ Cox
b26c88db2f reflect: fix doc nit
Type values being comparable implies that Type is a valid map key type.
As previously written, they sound unrelated.

Change-Id: I8e2235275d62898bfb47de850e8257b51ab5cbd6
Reviewed-on: https://go-review.googlesource.com/87021
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-09 21:48:16 +00:00
Russ Cox
6be622c380 doc: remove interior <code> spaces in debugging, diagnostics docs
Change-Id: I20de6207d386635025dbb603c57219218e9a9af5
Reviewed-on: https://go-review.googlesource.com/87019
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-09 21:48:03 +00:00
Russ Cox
ee34617d0d doc/debugging_with_gdb: soften text about disabling optimizations
Don't suggest that it's always necessary to disable optimizations.
(The text can be misread that way, even if it's not what was meant.)

Change-Id: I9a2dff6a75ce4a3f9210cdf4f5bad6aaaeae9b29
Reviewed-on: https://go-review.googlesource.com/87018
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-09 21:47:09 +00:00
Russ Cox
b6c871a2af doc: s/tool chain/toolchain/
We were not being consistent.
Standardize on toolchain.

Change-Id: Id0e756b5214ce4a1341f733634ed95263f03a61c
Reviewed-on: https://go-review.googlesource.com/87017
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-09 21:47:03 +00:00
Brad Fitzpatrick
3ea72fb1a1 doc/go1.10: remove ReverseProxy TODO
No longer needs to be done.

Updates #23009
Updates #21255

Change-Id: I78e9e29a923dc03dea89ff3a5bf60f2e0bd0c0aa
Reviewed-on: https://go-review.googlesource.com/86476
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-01-06 01:28:20 +00:00
Hana Kim
acc1ec9b9d doc/debugging_with_gdb: mention delve as an alternative.
Fixes #23108

Change-Id: I9b3d0f0c399c0b4cb488adaf3c002bc55d5d21d9
Reviewed-on: https://go-review.googlesource.com/84795
Reviewed-by: Heschi Kreinick <heschi@google.com>
2018-01-05 21:55:32 +00:00
Robert Griesemer
4de1d1d5cd spec: consistently use "element" rather than "value" for map entry values
The spec refers to a map's key and element types; thus the respective
values are "keys" and "elements". Also, a map value is the value of
the entire map.

Similar fix for channels, where appropriate.

Fixes #23254.

Change-Id: I6f03ea6d86586c7b0b3e84f0c2e9446b8109fa53
Reviewed-on: https://go-review.googlesource.com/85999
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2018-01-04 20:17:19 +00:00
Hana Kim
e676dbbdaf doc/diagnostics: update gc flags recommended for debugging
After 1.10, gcflags apply to only the immediate target.

Change-Id: I3bf331c76041e7b533076cb2f3274e44aafff58a
Reviewed-on: https://go-review.googlesource.com/84775
Reviewed-by: Heschi Kreinick <heschi@google.com>
2018-01-04 16:01:57 +00:00
Ian Lance Taylor
15bc0a129a doc/go1.10: mention new os.IsTimeout function
Change-Id: I84fd3912163ca262df5d7d4690c0dd7e136e79ca
Reviewed-on: https://go-review.googlesource.com/85938
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-03 04:34:11 +00:00
Brad Fitzpatrick
cd97aca3fd doc: 2018 is the Year of the Gopher
Change-Id: Ie167512e000f3a8be0ff8a6a9edd52bd74f45115
Reviewed-on: https://go-review.googlesource.com/85775
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2018-01-01 03:45:23 +00:00
Robert Griesemer
f3f507b2d8 spec: provide some (minimal) intuition for the notion of "terminating statement"
Fixes #23215.

Change-Id: Ib20825bf08915b4daaabbfd91f168e24973c512d
Reviewed-on: https://go-review.googlesource.com/85215
Reviewed-by: Rob Pike <r@golang.org>
2017-12-22 21:13:38 +00:00
Hana Kim
bfb8f2a765 doc/debugging_with_gdb: update -gcflags usage
After go1.10, compiler/linker option flags apply only to the packages
listed directly on the command line unless the matching pattern is
specified. For debugging, we want to apply the flags to all packages.

Change-Id: Ic69eee1491b1080fc140592f200c59a6e03d87ac
Reviewed-on: https://go-review.googlesource.com/84135
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-15 15:00:46 +00:00
JBD
c4da610197 doc: make it clear which pprof package is used
Updates #22027.

Change-Id: I5a5bae77a744c7a2ecb75172846e6461a98ee8af
Reviewed-on: https://go-review.googlesource.com/83916
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-14 17:40:20 +00:00
Brad Fitzpatrick
513a469119 doc/go1.10: note that netbsd/arm is definitely broken
Remove the ambiguity, know that we know it's actually broken,
per https://github.com/golang/go/issues/23073#issuecomment-351045421

Updates #23073

Change-Id: I9b904da2f4c7105a0727d2a9056aaa6895d3dadc
Reviewed-on: https://go-review.googlesource.com/83856
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-14 17:14:03 +00:00
Tobias Klauser
fa904420f2 doc/go1.10: fix formatting of 'go tool fix' examples
Also remove a superfluous </p>

Change-Id: Idca51cdfbd8abc6669f00c80ca3fb7f225ee445c
Reviewed-on: https://go-review.googlesource.com/84015
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-14 17:02:00 +00:00
JBD
774ae54777 doc: add some links to the diagnostics page
Updates #22027.

Change-Id: I468348d2b000f146f88ef8b7cf450eea8d1c12a7
Reviewed-on: https://go-review.googlesource.com/83917
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-14 00:13:04 +00:00
Hana Kim
26ec05cdbe doc: update info about flame graphs in diagnostics.html
Use Brendan Gregg's FlameGraphs page link.
Mention the flame graph is available from the upstream pprof.

Change-Id: Ife1d5a5f4f93f20cd5952a09083f798b77d25a60
Reviewed-on: https://go-review.googlesource.com/83798
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-13 19:04:01 +00:00
Russ Cox
81c19cc011 doc/go1.10: preannounce deprecation of OS X 10.9 Mavericks
By the time Go 1.11 is released, OS X 10.9 Mavericks will have gone
two years with no security updates.

For #23011.

Change-Id: I6482852a14477985769b72c45c92416aae8be100
Reviewed-on: https://go-review.googlesource.com/83795
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-12-13 17:52:38 +00:00
Brad Fitzpatrick
132b528e71 doc/go1.10: note that plugin now works on darwin/amd64
Fixes #23085

Change-Id: I7fef281079e9e08c49ae05371506b0b881a467db
Reviewed-on: https://go-review.googlesource.com/83577
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-13 01:38:19 +00:00
Stanislav Afanasev
2fb9fe48c6 doc/contrib.html: fix outdated link
Change-Id: I6d94a14a781a2fbeb90db35ae3490ce2ac5f8ed1
Reviewed-on: https://go-review.googlesource.com/83315
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-11 22:15:38 +00:00
Andrew Bonventre
dbe559e241 doc: change “substantial” to “significant”
Change-Id: Ie7f2890eab9ad82da93babc92380b13c611af3d0
Reviewed-on: https://go-review.googlesource.com/83375
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-11 22:11:32 +00:00
Andrew Bonventre
05deefee52 doc: fix misuse of “substantive” in 1.10 release notes
Use “substantial”, which is believed to be the correct word.
Additionally, this change strips trailing whitespace from the file.

Change-Id: I5b6b718fc09e4b8b911b95e8be0733abd58e165d
Reviewed-on: https://go-review.googlesource.com/83356
Reviewed-by: Andrew Gerrand <adg@golang.org>
2017-12-11 21:46:12 +00:00
Brad Fitzpatrick
0da486dc72 doc: update NetBSD status
Fixes #23073

Change-Id: Ia43b28beeff9e57579caf5dcb76146ee29d5033b
Reviewed-on: https://go-review.googlesource.com/82918
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-11 06:12:51 +00:00
Keith Randall
25363de226 doc: add doc about C types that we map to uintptr instead of ptr
Update #22906
Update #21897

Change-Id: I73709b2fdac6981d4bc2f7dab0767f2dd7be3be5
Reviewed-on: https://go-review.googlesource.com/82917
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-08 16:54:20 +00:00
Tobias Klauser
d1fa58719e doc/go1.10: fix HTML start tag
Change-Id: I33f14ea1d58e18081bae3f16c87d11312249c842
Reviewed-on: https://go-review.googlesource.com/82835
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-08 13:57:22 +00:00
Brad Fitzpatrick
38083c83a6 doc: fix mistake in NetBSD notes
It's 32-bit binaries that fail for reasons unknown on 64-bit kernels.

Change-Id: Ib410af0491160e3ed8d32118966142516123db2c
Reviewed-on: https://go-review.googlesource.com/82655
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-07 23:37:46 +00:00
Brad Fitzpatrick
4f1fca9564 doc/go1.10: fix HTML close tags
Change-Id: I28ddb8cd347120c08d5b58ae20f481b60416abc1
Reviewed-on: https://go-review.googlesource.com/82755
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-12-07 23:28:39 +00:00
Alberto Donizetti
99f4cf9714 doc: fix bad html tags in editors.html
Change-Id: Ib8ef626ae6bc66571ecf4569e37feb75b4b90d10
Reviewed-on: https://go-review.googlesource.com/82555
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-07 17:31:51 +00:00
Brad Fitzpatrick
617fc0ffd3 doc/go1.10: add NetBSD and OpenBSD to Go 1.10 release notes
Fixes #22911

Change-Id: I61de85323e290b64917a09bc512935e835ff7cf0
Reviewed-on: https://go-review.googlesource.com/82276
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-07 01:07:30 +00:00
Russ Cox
9b8d604db2 doc/go1.10: preannounce removal of OS X 10.8 support in Go 1.11
For #23011.

Change-Id: Ibd934f32e41cb8dddbd3d68a324536cf29a97916
Reviewed-on: https://go-review.googlesource.com/82275
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-06 18:44:35 +00:00
Alberto Donizetti
28736053ad doc: fix two spelling mistakes in contribute.html
Change-Id: Ife60468d508f90321733ebdbdb0e6cf443ba1659
Reviewed-on: https://go-review.googlesource.com/82156
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-06 15:50:04 +00:00
Alberto Donizetti
dfd6b6efe1 doc: fix dead link in go_faq
Change-Id: I8a9e4d00247fe9bda6e19551850bdec0367df2e1
Reviewed-on: https://go-review.googlesource.com/82157
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-06 15:49:37 +00:00
Russ Cox
c56fda63a4 doc/go1.10: fix many TODOs
Change-Id: I97a28379b1a9ca3daa875edbcd5213673ca138d0
Reviewed-on: https://go-review.googlesource.com/82115
Reviewed-by: Russ Cox <rsc@golang.org>
2017-12-06 15:36:58 +00:00
Russ Cox
8114a855da doc/go1.10: process comments from CL 78131 PS 5
Change-Id: Ie246756452cd872961aeb659b35297c229504a3c
Reviewed-on: https://go-review.googlesource.com/81936
Reviewed-by: Russ Cox <rsc@golang.org>
2017-12-06 15:36:42 +00:00
Russ Cox
d62809096a doc/go1.10: update release notes for recent commits
Change-Id: Id6ced9a6c76131263041cdaf5ed17479be075fa6
Reviewed-on: https://go-review.googlesource.com/82075
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2017-12-06 15:36:11 +00:00
Tobias Klauser
ba2db584c7 doc: fix spelling in editor guide
Change-Id: If16f069f410d043fd11864a4c1a7d54b5b4922d2
Reviewed-on: https://go-review.googlesource.com/82200
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-12-06 15:25:36 +00:00
Vladimir Stefanovic
12abacb555 cmd/go, cmd/dist: introduce GOMIPS environment variable
GOMIPS is a GOARCH=mips{,le} specific option, for a choice between
hard-float and soft-float. Valid values are 'hardfloat' (default) and
'softfloat'. It is passed to the assembler as
'GOMIPS_{hardfloat,softfloat}'.

Note: GOMIPS will later also be used for a choice of MIPS instruction
set (mips32/mips32r2).

Updates #18162

Change-Id: I35417db8625695f09d6ccc3042431dd2eaa756a6
Reviewed-on: https://go-review.googlesource.com/37954
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2017-11-30 16:57:08 +00:00
Leigh McCulloch
07a2ffaf0b doc: move single change workflow note in contribution guide
The note about the single change workflow is included in the
git-codereview installation instructions, but it has nothing to do with
installing git-codereview. This note is more relevant for when a change
is actually being made.

Change-Id: Iccb90f3b7da87fab863fa4808438cd69a21a2fce
Reviewed-on: https://go-review.googlesource.com/76317
Reviewed-by: Steve Francia <spf@golang.org>
2017-11-29 20:19:32 +00:00
Rob Pike
21672b36eb doc/faq: tweak the wording in the new section on goroutine IDs
There were too many changes of direction. Tidy up the intro a little
for better flow, and delete some unnecessary comments.

Change-Id: Ib5d85c0992626bd3152f86a51585884d3e0cab72
Reviewed-on: https://go-review.googlesource.com/80495
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-29 05:17:03 +00:00
Rob Pike
992ce90f66 doc/faq: explain why goroutines are anonymous
Fixes #22770.

Change-Id: Ief62043fb6895e215d2530d2a3bf88f7ea58c875
Reviewed-on: https://go-review.googlesource.com/80195
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-29 03:24:52 +00:00
Mikio Hara
e76ae8af92 all: drop support for FreeBSD 9 or below
This change drops the support for FreeBSD 9 or below and simplifies
platform-dependent code for the sake of maintenance.

Updates #7187.
Fixes #11412.
Updates #16064.
Updates #18854.
Fixes #19072.

Change-Id: I9129130aafbfc7d0d7e9b674b6fc6cb31b7381be
Reviewed-on: https://go-review.googlesource.com/64910
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-11-28 18:57:25 +00:00
Andrew Bonventre
4aac23cc51 doc: update URL of the go1.4 source snapshot to use dl.google.com
Updates golang/go#20672

Change-Id: I88a1d8693ef9d1e4758719603ce1f3c3f6b920bc
Reviewed-on: https://go-review.googlesource.com/79936
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-27 16:25:25 +00:00
Ryuji Iwata
c52e26e323 doc: fix a sentence position.
Only a last sentence of A Tour of Go is shifting to the left.
I fixed a HTML tag order according to other sentences it.

Change-Id: I6a301178d15db893f596b8da80a4d98721160386
Reviewed-on: https://go-review.googlesource.com/79856
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-25 17:06:50 +00:00
Tom Levy
8a092b74fc doc: fix typo in Effective Go: s/ReaderWriter/ReadWriter/
Change-Id: I3bfe1b11265f0def4701faf2cfc1ad10a666a473
Reviewed-on: https://go-review.googlesource.com/79596
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-23 04:07:39 +00:00
Brad Fitzpatrick
71aee2a190 doc: update the URL of the latest go1.4 source snapshot
Updates golang/go#20672

Change-Id: I3c62b1606aec93e188255f1701c0af569d540016
Reviewed-on: https://go-review.googlesource.com/79276
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-11-22 02:36:34 +00:00
Florin Patan
1e679ae2aa doc: rename Gogland to GoLand
This updates the name of the IDE and the capability it has.

Fixes #22784

Change-Id: Ief261324c86bc77a03071629f496f4d4d9df1b44
Reviewed-on: https://go-review.googlesource.com/79255
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-22 01:18:45 +00:00
Reilly Watson
78615844f5 doc: fix some typos in diagnostics.html
The section about custom pprof paths referenced the wrong path.

This also fixes a couple minor grammatical issues elsewhere in the doc.

Fixes #22832

Change-Id: I890cceb53a13c1958d9cf958c658ccfcbb6863d5
Reviewed-on: https://go-review.googlesource.com/79035
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
2017-11-21 20:29:01 +00:00
Russ Cox
4f6035ae13 doc/contrib.html: add Go 1.10 to release list
Apparently we maintain this list by hand (for example, CL 52351).

Change-Id: I0a0b346cf2b7b547729cb1d0fa1642de447f7bba
Reviewed-on: https://go-review.googlesource.com/78117
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-15 21:26:27 +00:00
Russ Cox
0434426686 doc/go1.10: first draft of release notes
Change-Id: If7ec07be4ecb0c1d6a1eb5c0740f150473aea6fa
Reviewed-on: https://go-review.googlesource.com/78130
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2017-11-15 21:22:43 +00:00
Hana Kim
01c979dabe doc: correct supported gdb version info
GDB 7.5 recognizes DWARF4 by default.

GDB 7.5 release note does not explicitly mention DWARF4 support
but according to GCC 4.8 release note
 https://gcc.gnu.org/gcc-4.8/changes.html

 "DWARF4 is now the default when generating DWARF debug
 information. ...
 GDB 7.5, Valgrind 3.8.0 and elfutils 0.154 debug information
 consumers support DWARF4 by default."

Change-Id: I56b011c7c38fbc103bbd366ceaea3b709c66ab7f
Reviewed-on: https://go-review.googlesource.com/77570
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
2017-11-14 21:05:02 +00:00
Kevin Burke
1722a2d79d doc: mention the scratch repo
If people are interested in contributing to Go, but not sure what
change they'd like to make just yet, we can point them to the scratch
repo, so they can go through the process of submitting and merging
something now, and make more useful contributions later.

My evidence that sending people to the scratch repo would encourage
future contributions is that a number of people who went through the
workshop at Gophercon have continued to send CL's after submitting to
the scratch repo, even though I doubt they planned to before going
through the workshop.

Change-Id: Ieb48415773c0ee7dc400f8bf6f57f752eca8eeb5
Reviewed-on: https://go-review.googlesource.com/49970
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-11-13 20:50:32 +00:00
griesemer
f2d52519e1 spec: match syntax for method expressions with implementations
A method expression is of the form T.m where T is a type and m
is a method of that type. The spec restricted T essentially to
a type name. Both cmd/compile and go/types accepted any type
syntactically, and a method expression was really just a form
of a selector expression x.f where x denotes a type.

This CL removes the spec syntax restriction from MethodExpr
to match the actual implementation. It also moves MethodExpr
from Operand to PrimaryExpr, because that's what it is.

It still keeps the separate notion of MethodExpr even though
it looks just like a selector expresion, since a MethodExpr
must start with a type rather than a value, and the spec's
syntax expresses this bit of semantics via distinct productions
(e.g., conversions look like calls but also must start with
a type).

Fixes #9060.

Change-Id: Idd84655b5b4f85d7ee53ebf749f73f0414a05f4a
Reviewed-on: https://go-review.googlesource.com/73233
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-25 22:49:03 +00:00
Russ Cox
eb7e84500f doc: document Go 1.9.2
Change-Id: I7d63e747e798d588bdcf2b79b6ecd21fce7bbc9c
Reviewed-on: https://go-review.googlesource.com/73391
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-10-25 16:09:24 +00:00
Russ Cox
381b680719 doc: document Go 1.8.5
Change-Id: I9241e6acb65c337b961eed9cdeaf4c041b6326a3
Reviewed-on: https://go-review.googlesource.com/73390
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-10-25 16:09:20 +00:00
griesemer
0c5b00d0cd spec: remove sentence discussing existing implementations
Fixes #22282.

Change-Id: I4097e9cbd590ab6c8b1511a3b752c6ac98ac819b
Reviewed-on: https://go-review.googlesource.com/72792
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-10-23 21:39:03 +00:00
griesemer
85177f4276 spec: remove vestiges referring to iotas being incremented
https://golang.org/cl/71750 specifies iota values as indices,
thus making them independent from nested constant declarations.
This CL removes some of the comments in the examples that were
still referring to the old notion of iotas being incremented
and reset.

As an aside, please note that the spec still permits the use
of iota in a nested function (like before). Specifically, the
following cases are permitted by the spec (as before):

1) const _ = len([iota]int{})
2) const _ = unsafe.Sizeof(func(){ _ = iota })

For #15550.

Change-Id: I9e5fec75daf7b628b1e08d970512397e9c348923
Reviewed-on: https://go-review.googlesource.com/71912
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-10-19 22:22:55 +00:00
griesemer
52dd39965e spec: clarify that each block has its own version of iota
Issue #15550 is clearly an esoteric case but the spec was silent
about it and we had diverging implementations. By making `iota`
and index that is relative to the respective constant declaration,
nested const declarations won't affect outer values of `iota`.

cmd/compile and go/types already follow this semantics.

Fixes #15550.

Change-Id: If138189e3ea4373f8ba50ac6fb1d219b481f8698
Reviewed-on: https://go-review.googlesource.com/71750
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-19 15:30:37 +00:00
griesemer
ada6557593 spec: simplify paragraph on certain range expressions over arrays
Fixes #22258.

Change-Id: I43e68f1cf3163e1a041ebff2734ff2cb7943f695
Reviewed-on: https://go-review.googlesource.com/71431
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-10-19 00:29:56 +00:00
griesemer
ddc64def0f spec: explicitly state the import path for package unsafe
Nowhere in the spec did we mention the import path for package
unsafe. Now we do.

Fixes #22308.

Change-Id: Ifd42c873188e898c597cdee4284e7a9d234a9282
Reviewed-on: https://go-review.googlesource.com/71373
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-10-17 23:30:58 +00:00
Ian Lance Taylor
67388e9866 doc: recommend building Go 1.4 with CGO_ENABLED=0
Fixes #21054

Change-Id: I016486dc62c04a80727f8da7d1dcec52f2c7f344
Reviewed-on: https://go-review.googlesource.com/62291
Reviewed-by: Giovanni Bajo <rasky@develer.com>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-10-12 01:03:14 +00:00
Chris Broadfoot
ec40c7e189 doc: add missing "Minor revisions" header for 1.9
Change-Id: Ib042e472e62f48a6afaba1762beaf102a9b99cf5
Reviewed-on: https://go-review.googlesource.com/68290
Reviewed-by: Russ Cox <rsc@golang.org>
2017-10-04 20:22:15 +00:00
Chris Broadfoot
dbb13eff8e doc: document go1.9.1 and go1.8.4
Change-Id: Ib42fabc6829b6033373c0378713733f88e73e73d
Reviewed-on: https://go-review.googlesource.com/68230
Reviewed-by: Russ Cox <rsc@golang.org>
2017-10-04 18:24:32 +00:00
Andrew Bonventre
2e405bde03 doc: update contribute.html to clarify replying to reviews via email
Update golang/go#22120

Change-Id: Ie7dbd0e7b01b116c960243a8cd3fa9fd121f317d
Reviewed-on: https://go-review.googlesource.com/68021
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
2017-10-04 05:01:18 +00:00
Ian Lance Taylor
a9345307a1 doc: update GCC release info in gccgo_install
Fixes #22077

Change-Id: I8d1b18e78719514fa2a410e85c9d3934c47cd2fe
Reviewed-on: https://go-review.googlesource.com/66930
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2017-10-03 14:33:14 +00:00
Agniva De Sarker
b3cae37464 doc: fix minor capitalization typo
Updated page to Page to match with the sample code

Fixes #21773

Change-Id: Ia884a22fd587860c7a6148103b2b474425e45284
Reviewed-on: https://go-review.googlesource.com/66790
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-28 17:13:13 +00:00
griesemer
4a2391e7c9 spec: state which predeclared types are defined or alias types (clarification)
When we introduced the distinction between "defined" and "alias" types
we retained the notion of a "named" type (any type with a name). The
predeclared types (which all have names) simply remained named types.

This CL clarifies the spec by stating excplicitly which predeclared
types are defined types (or at least "act" like defined types), and
which ones are alias types.

Fixes #21785.

Change-Id: Ia8ae133509eb5d738e6757b3442c9992355e3535
Reviewed-on: https://go-review.googlesource.com/64591
Reviewed-by: Russ Cox <rsc@golang.org>
2017-09-19 14:33:25 +00:00
Gabriel Aszalos
c40579ac75 doc: simplify Append example in "Effective Go"
Change-Id: I011486993b167e65c69da1c8390bbcc625ca58c3
Reviewed-on: https://go-review.googlesource.com/64331
Reviewed-by: Rob Pike <r@golang.org>
2017-09-19 00:48:10 +00:00
Michael Munday
c2f8ed267b doc: mention s390x in environment section of install-source.html
Change-Id: I521ba94356165efc3252ca4b3d364a2bbabd4aab
Reviewed-on: https://go-review.googlesource.com/58010
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-13 07:19:21 +00:00
Tobias Klauser
1a706bbf05 doc: unify colons and spacing in diagnostics guide
Unify colons (outside of <strong></strong>) and add a missing space in
the list of groups of diagnostics solutions.

Change-Id: Icbcd94427d4905dd88c4ea82aaa5dbf064c00990
Reviewed-on: https://go-review.googlesource.com/63111
Reviewed-by: JBD <jbd@google.com>
2017-09-12 17:39:27 +00:00
Andrew Bonventre
98603e7af6 doc: hide content blocked by GFW when served in CN
Change-Id: Ia3d0fa0517d96f0672d3c5ce7e7b7bb8bd0ce093
Reviewed-on: https://go-review.googlesource.com/60070
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-09-11 14:59:59 +00:00
Jaana Burcu Dogan
e91639285f doc: fix typo in the diagnostics guide
Change-Id: Ib1b93e55788168b574badeb84d0e6c4f3795055e
Reviewed-on: https://go-review.googlesource.com/62510
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-11 07:54:34 +00:00
Jaana Burcu Dogan
669dcca9ef doc: add a diagnostics guide
Diagnostics guide lists various dimensions of
diagnostics tools and libraries available in Go.
As a follow-up, I will add an entry section where
we navigate user to the right tool depending on
the type of problem they are willing to improve
or understand better.

Change-Id: I4e94b4b834014f51c988103457da84200c7827d9
Reviewed-on: https://go-review.googlesource.com/61693
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2017-09-08 21:57:15 +00:00
Hana Kim
0202aa8ec7 doc: update DWARF version
Change-Id: I0d02e5e44053f02fee3d84c782995ea4ce209a80
Reviewed-on: https://go-review.googlesource.com/62070
Reviewed-by: Heschi Kreinick <heschi@google.com>
2017-09-06 20:26:48 +00:00
Andrii Soldatenko
53d24f76fb doc: Fixed missing dot in effective_go.html
First sentence of https://golang.org/doc/effective_go.html#maps dot is missing.

Change-Id: Ic93b407945a6ad24a73ae9f7b6076ac9619871db
Reviewed-on: https://go-review.googlesource.com/61020
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2017-09-03 21:23:06 +00:00
griesemer
9690d245d5 spec: clarify context type for certain non-constant shifts
The spec is not conclusive about whether a non-constant shift of
certain untyped constant left operands is valid when the shift
expression appears as an index in an index or slice expression,
or as a size in a `make` function call.

Despite identical spec rules in all these cases, cmd/compile accepts

	make([]byte, 1.0 << s)

but pronounces an error for

	a[1.0 << s]

(go/types accepts both).

This change clarifies the spec by explicitly stating that an
untyped constant left operand in a non-constant shift (1.0 in
the above examples) will be given type `int` in these contexts.

A separate issue #21693 addresses the cmd/compile bug.

Fixes #14844.

Change-Id: I4b52125e487a607fae377fcbed55463cdce9836c
Reviewed-on: https://go-review.googlesource.com/60230
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-09-01 15:46:24 +00:00
Matthew Dempsky
e236b6721c doc/articles/wiki: fix final-test.patch
Fixes test regression introduced by golang.org/cl/53071.

Change-Id: Ibb085cf6d6be7b91b7c90b7bc6237c10f3097703
Reviewed-on: https://go-review.googlesource.com/60775
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-08-31 21:25:48 +00:00
Francesc Campoy Flores
e3e09e3d5f doc: add error handling on http.ListenAndServe
Fixes #19511

Change-Id: I5585726773b822dba0be0196961132323ebbe084
Reviewed-on: https://go-review.googlesource.com/53071
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-08-31 17:52:01 +00:00
Hiroshi Ioka
03876af91c cmd/cgo: support niladic function-like macros
Currently, cgo supports only macros which can be reduced to constants
or variables. The CL addresses remaining parts, macros which can be
represented as niladic functions.

The basic idea is simple:
  1. make a thin wrapper function per macros.
  2. replace macro expansions with function calls.

Fixes #10715
Fixes #18720

Change-Id: I150b4fb48e9dc4cc34466ef6417c04ac93d4bc1a
Reviewed-on: https://go-review.googlesource.com/43970
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-30 18:28:58 +00:00
griesemer
2ac43d5be2 doc: minor clarification regarding the sharing of underlying arrays
The last sentence in the section on slice expressions could be read
as if it might apply to strings. Changed the sentence a bit to
emphasize its applicability to slices only. See also the issue for
more background.

Fixes #19220.

Change-Id: I8551f34230e4ed93f951e7b871cc81f54a5874a9
Reviewed-on: https://go-review.googlesource.com/59890
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-30 15:24:12 +00:00
Tom Bergan
75d7a02e86 doc/1.9: add mention of net/http.LocalAddrContextKey
Fixes #21603

Change-Id: I42fb7ea2dd7f6d6a201171055beaeda68c26b823
Reviewed-on: https://go-review.googlesource.com/59530
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-28 19:21:54 +00:00
griesemer
b40831b115 spec: explicitly define notion of "representability" (clarification)
Throughout the spec we use the notion of a constant x being
representable by a value of type T. While intuitively clear,
at least for floating-point and complex constants types, the
concept was not well-defined. In the section on Conversions
there was an extra rule for floating-point types only and it
missed the case of floating-point values overflowing to an
infinity after rounding.

Since the concept is important to Go, and a compiler most
certainly will have a function to test "representability",
it seems warranted to define the term explicitly in the spec.

This change introduces a new entry "Representability" under
the section on "Properties of types and values", and defines
the term explicitly, together with examples.

The phrase used is "representable by" rather than "representable as"
because the former use is prevalent in the spec.

Additionally, it clarifies that a floating-point constant
that overflows to an infinity after rounding is never
representable by a value of a floating-point type, even though
infinities are valid values of IEEE floating point types.
This is required because there are not infinite value constants
in the language (like there is also no -0.0) and representability
also matters for constant conversions. This is not a language
change, and type-checkers have been following this rule before.

The change also introduces links throughout the spec to the new
section as appropriate and removes duplicate text and examples
elsewhere (Constants and Conversions sections), leading to
simplifications in the relevant paragraphs.

Fixes #15389.

Change-Id: I8be0e071552df0f18998ef4c5ef521f64ffe8c44
Reviewed-on: https://go-review.googlesource.com/57530
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2017-08-25 19:54:57 +00:00
griesemer
a9f832a6ae spec: clarify zero value for complex types
The enumeration of numeric types missed the complex types.
Clarify by removing the explicit enumeration and referring
to numeric types instead.

Fixes #21579.

Change-Id: If36c2421f8501eeec82a07f442ac2e16a35927ba
Reviewed-on: https://go-review.googlesource.com/58491
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
2017-08-25 08:12:51 +00:00
griesemer
84ac90ebf1 spec: clarify nil case in type switches
The old wording seemed to imply that nil is a kind of type.
Slightly reworded for clarity.

Fixes #21580.

Change-Id: I29898bf0125a10cb8dbb5c7e63ec5399ebc590ca
Reviewed-on: https://go-review.googlesource.com/58490
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Rob Pike <r@golang.org>
2017-08-25 08:09:57 +00:00
Chris Broadfoot
ace6074593 doc: add go1.9 to golang.org/project
Pre-emptive. Go 1.9 is expected to be released in August.

Change-Id: I0f58c012c4110bf490022dc2c1d69c0988d73bfa
Reviewed-on: https://go-review.googlesource.com/52351
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-24 19:55:25 +00:00
Chris Broadfoot
d77dfba96b doc: document go1.9
Change-Id: I97075f24319a4b96cbeb9e3ff2e7b2056ff59e32
Reviewed-on: https://go-review.googlesource.com/58651
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-24 19:54:25 +00:00
Ryuji IWATA
b1dc2c28a5 doc/go1.9: fix typo in Moved GOROOT
Change-Id: I71bfff6a3462e6dfd7a65ef76ec56644bae37c34
Reviewed-on: https://go-review.googlesource.com/57272
Reviewed-by: Avelino <t@avelino.xxx>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 04:41:20 +00:00
Ryuji IWATA
b3a1781286 doc/go1.9: fix typo in crypto/x509 of "Minor changes to the library".
Change-Id: I79fee40370dc6758ca1869227f076c61d07f21a5
Reviewed-on: https://go-review.googlesource.com/57390
Reviewed-by: Avelino <t@avelino.xxx>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-21 04:28:28 +00:00
griesemer
5abc8c897c spec: better comment in example for type definition
The old comment for the example

	type PtrMutex *Mutex

talked about the method set of the base type of PtrMutex.
It's more direct and clearer to talk about the underlying
type of PtrMutex for this specific example.
Also removed link inside pre-formatted region of text.

Fixes #20900.

Change-Id: Ie37340e53670e34ebe13e780ba8ccb1bba67795c
Reviewed-on: https://go-review.googlesource.com/55070
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-08-14 13:35:43 +00:00
Mat Byczkowski
15cb18dbfa doc/1.9: add CL 44074 for net/http to the release notes
Change-Id: I2eb4f9531372c792a98578560e946d803ad96da8
Reviewed-on: https://go-review.googlesource.com/54411
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2017-08-10 17:47:06 +00:00
Christian Alexander
1b53f1245b doc/contribute: improve wording of Gerrit description
The word "of" was removed in https://go-review.googlesource.com/c/36626

Change-Id: Iece69f425d06ab1cf02743b1033cfed2e96667ab
Reviewed-on: https://go-review.googlesource.com/54290
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-09 15:29:05 +00:00
RaviTeja
4e0738a3ad doc/contribute.html: fix name of .gitcookies file
Change-Id: I41c22b9c6933b3f3469c0e815048a49e1d37927a
Reviewed-on: https://go-review.googlesource.com/54190
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-09 13:23:19 +00:00
Ian Lance Taylor
909f409a8d doc: mention handling of moved GOROOT in 1.9 release notes
Updates #20587

Change-Id: Ia131b9a4dc4986950d9ecbfcbd6b026ade234fc0
Reviewed-on: https://go-review.googlesource.com/53370
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-04 22:14:38 +00:00
Jaana Burcu Dogan
58ad0176ca doc: use better wording to explain type-aware completion
Some editors can filter the autocompletion suggestions based on
whether the code will compile once autocompleted. Explain this
feature with better wording.

Change-Id: I29e4b0396878f18c79208915402c0a209a813b04
Reviewed-on: https://go-review.googlesource.com/53355
Reviewed-by: Florin Patan <florinpatan@gmail.com>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-08-04 20:18:16 +00:00
Jaana Burcu Dogan
92dac21d29 doc: replace paid with commercial
Change-Id: I3e6de4da0648f61e254c7597f316df3e5791321a
Reviewed-on: https://go-review.googlesource.com/53354
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-08-04 19:55:05 +00:00
Tristan Colgate
9bb98e02de doc/1.9: add CL 43712, ReverseProxy of HTTP/2 trailers to the release notes.
Add https://go-review.googlesource.com/c/43712,
"net/http/httputil: ReverseProxy should pass on unannounced Trailers"
to the relase notes.

Fixes #21307

Change-Id: I52c126987a5d0abc4153c0e71b535529c46cd457
Reviewed-on: https://go-review.googlesource.com/53290
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-08-04 18:36:20 +00:00
Jaana Burcu Dogan
78d74fc2cd doc: clarify that Gogland is for paid IntelliJ platform IDEs
Fixes #21213.

Change-Id: I7b8a84de92bbd1d3f78f8a9612f3af8cd092cb94
Reviewed-on: https://go-review.googlesource.com/53351
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2017-08-04 16:53:33 +00:00