1
0
mirror of https://github.com/golang/go synced 2024-09-25 05:10:12 -06:00
Commit Graph

2288 Commits

Author SHA1 Message Date
Emil Hessman
ddb24da850 doc: fix typo in gccgo contribute
Change-Id: Ib9699fc9c45f61e9d75e9d9ae69167f039a66dfc
Reviewed-on: https://go-review.googlesource.com/1890
Reviewed-by: Minux Ma <minux@golang.org>
2014-12-19 17:57:33 +00:00
Brad Fitzpatrick
7a8e897979 doc: start go1.5.txt
Change-Id: I0f9cf081cb280f0a805ee7f5178a5cbed0d4ad88
Reviewed-on: https://go-review.googlesource.com/1842
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-19 02:49:31 +00:00
Andrew Gerrand
0293b7ee37 doc: fixes to contributor docs
Change-Id: Ib31fb1f8239d8113728bc4c6e411416721571341
Reviewed-on: https://go-review.googlesource.com/1743
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2014-12-18 02:17:32 +00:00
Andrew Gerrand
968f0df5d8 doc: update source install instructions
Change-Id: I794a5773ed47d470ff91fcdd82f9747a91424eb4
Reviewed-on: https://go-review.googlesource.com/1402
Reviewed-by: Rob Pike <r@golang.org>
2014-12-18 00:54:43 +00:00
Andrew Gerrand
722f7d280b doc: use 'git-codereview' in contributor docs
Change-Id: I63d5c81fdaf9aca2fc3da3defcc6e9c4094c690b
Reviewed-on: https://go-review.googlesource.com/1742
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-18 00:45:35 +00:00
Andrew Gerrand
8655f04d8e doc: propose $GOPATH as $HOME/work, not $HOME/go
Related to issue #9228

Change-Id: I0819e657f6393788754d1412f9c2126a170d4cf1
Reviewed-on: https://go-review.googlesource.com/1577
Reviewed-by: Rob Pike <r@golang.org>
2014-12-16 04:35:09 +00:00
Kang Hu
c8bfcf5c55 doc: replace hg commands with git commands in release.html
Change-Id: I5cc4740a858c40d820eeb7c00cf0508b20807c90
Reviewed-on: https://go-review.googlesource.com/1533
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-14 23:37:18 +00:00
Andrew Gerrand
eb91b5f224 [release-branch.go1.4] doc: scrub references to code.google.com
These are the references that affect current Go users.
I left intact references in older release notes;
we can figure out what to do with them later.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/186140043

Conflicts:
	doc/go1.4.html

Change-Id: I1032686f2b3ac6dacaf8f114b8c35cdf221330ca
2014-12-12 14:00:48 +11:00
Andrew Gerrand
d708e92676 [release-branch.go1.4] [release-branch.go1.4] doc: update contribution guidelines
LGTM=minux, adg, rsc
R=rsc, r, dsymonds, minux, bradfitz, adg, dave, iant
CC=golang-codereviews
https://golang.org/cl/185190043
2014-12-12 13:59:23 +11:00
David Symonds
afc2890291 doc/play: revise peano.go comment again.
Change-Id: I412358e99301d1c9603960fd34601dae60fca3cb
Reviewed-on: https://go-review.googlesource.com/1400
Reviewed-by: Rob Pike <r@golang.org>
2014-12-12 01:40:04 +00:00
David Symonds
da43976c8b doc/play: update obsolete comment in peano.go.
Change-Id: Ibecc2ef1e70c927c325c48bc381091f52c09da85
Reviewed-on: https://go-review.googlesource.com/1355
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-11 23:23:30 +00:00
Andrew Gerrand
33da2430f1 doc: tweak Go 1.4 release notes
LGTM=dave, dsymonds
R=golang-codereviews, dave, dsymonds
CC=golang-codereviews
https://golang.org/cl/184350043
2014-12-11 17:38:49 +11:00
Andrew Gerrand
107eea518b doc: document go1.4
LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/189810043
2014-12-11 17:37:55 +11:00
Andrew Gerrand
8ea28028e8 doc: remove TODO from go1.4 release notes
LGTM=bradfitz
R=iant, rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/191750043
2014-12-11 17:37:42 +11:00
David Symonds
36e443342d doc: remove obsolete FAQ entry about using Mercurial vs. Git.
Change-Id: I9d9b02ad745208e7297cb75c86af49b2d858b12d
Reviewed-on: https://go-review.googlesource.com/1176
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-08 21:15:02 +00:00
David Symonds
583b29cb18 spec: add comment marker for consistency.
LGTM=r
R=gri, r
CC=golang-codereviews
https://golang.org/cl/185830043
2014-12-04 09:29:29 +11:00
Andrew Gerrand
c1374b5c78 doc: tidy up "Projects" page; add Go 1.4
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/182750043
2014-11-25 15:41:33 +11:00
Rob Pike
f03f0cba2b doc/go1.4.html: rewrite first sentence to make it clearer
The grammar was atrocious, probably the victim of an editing error.

LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/178910043
2014-11-18 13:32:00 +11:00
Yasuhiro Matsumoto
59439f8ea3 doc: fix small typo in doc
LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/170660043
2014-11-14 14:05:14 +11:00
Robert Griesemer
40818cfe1c spec: method selectors don't auto-deref named pointer types
Language clarification.

The existing rules for selector expressions imply
automatic dereferencing of pointers to struct fields.
They also implied automatic dereferencing of selectors
denoting methods. In almost all cases, such automatic
dereferencing does indeed take place for methods but the
reason is not the selector rules but the fact that method
sets include both methods with T and *T receivers; so for
a *T actual receiver, a method expecting a formal T
receiver, also accepts a *T (and the invocation or method
value expression is the reason for the auto-derefering).

However, the rules as stated so far implied that even in
case of a variable p of named pointer type P, a selector
expression p.f would always be shorthand for (*p).f. This
is true for field selectors f, but cannot be true for
method selectors since a named pointer type always has an
empty method set.

Named pointer types may never appear as anonymous field
types (and method receivers, for that matter), so this
only applies to variables declared of a named pointer
type. This is exceedingly rare and perhaps shouldn't be
permitted in the first place (but we cannot change that).

Amended the selector rules to make auto-deref of values
of named pointer types an exception to the general rules
and added corresponding examples with explanations.

Both gc and gccgo have a bug where they do auto-deref
pointers of named types in method selectors where they
should not:

See http://play.golang.org/p/c6VhjcIVdM , line 45.

Fixes #5769.
Fixes #8989.

LGTM=r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/168790043
2014-11-11 13:19:47 -08:00
Rob Pike
0f8cd1438d doc/gopher: add jpgs of the 5th anniversary image
LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/172980043
2014-11-11 23:46:20 +11:00
Nigel Tao
e522a477c2 doc: update go1.4.html's minor library changes.
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/173920043
2014-11-11 16:06:47 +11:00
Andrew Gerrand
7f0be1f781 all: use golang.org/x/... import paths
LGTM=rsc, r
R=r, rsc
CC=golang-codereview, golang-codereviews
https://golang.org/cl/168050043
2014-11-10 09:15:57 +11:00
Russ Cox
08b2cb4afe doc/go1.4.html: leave stack size at 2 kB
LGTM=r
R=khr, r
CC=golang-codereviews
https://golang.org/cl/165590043
2014-11-06 15:19:16 -05:00
Russ Cox
6bc812e9ec doc: change "/s/..." links to be on golang.org
People viewing this locally will not have a /s/ on their local godoc.
tip.golang.org doesn't have one either.

Also change all golang.org links to https, to avoid mixed content
warnings when viewing https://golang.org/.

Fixes #9028.

LGTM=bradfitz, r
R=r, bradfitz
CC=adg, golang-codereviews
https://golang.org/cl/168250043
2014-11-06 15:18:47 -05:00
Russ Cox
67742ef560 doc/go1.4.html: document new subrepo import paths
LGTM=r, adg
R=adg, r, 0xjnml, dr.volker.dobler
CC=golang-codereviews
https://golang.org/cl/166980044
2014-11-05 20:15:48 -05:00
Andrew Gerrand
b802240300 doc: document go get -f flag in 1.4 release notes
LGTM=r, rsc
R=r, rsc, adg
CC=golang-codereviews
https://golang.org/cl/168890043
2014-11-03 17:01:17 +11:00
Brad Fitzpatrick
f21a02a179 doc/go1.4.html: tweak http.Transport.DialTLS wording
It doesn't simplify, because it wasn't even possible before.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/164250043
2014-10-30 10:58:31 -03:00
Mikio Hara
70dc39e17d doc/go1.4.html: fix typo
LGTM=adg
R=r, adg
CC=golang-codereviews
https://golang.org/cl/165890043
2014-10-30 14:15:00 +09:00
Rob Pike
bfe459adc9 doc/go1.4.html: final library changes
First draft now complete.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/170750043
2014-10-29 15:35:48 -07:00
Rob Pike
97b24a05df doc/go1.4.html: gccgo status
LGTM=iant, cmang
R=cmang, iant, rsc
CC=golang-codereviews
https://golang.org/cl/169760043
2014-10-29 13:07:34 -07:00
Rob Pike
799da9cee7 doc/go1.4.html: half of the small library changes
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/165090043
2014-10-29 08:15:58 -07:00
Rob Pike
ce7c8fe0fd doc/go1.4.html: GODEBUG and assembler changes
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/160660046
2014-10-28 20:12:17 -07:00
Rob Pike
982dcb249d doc/go1.4.html: breaking compiler change, no plugins in misc
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/166850043
2014-10-28 13:49:41 -07:00
Russ Cox
202bf8d94d doc/asm: explain coordination with garbage collector
Also a few other minor changes.

Fixes #8712.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/164150043
2014-10-28 15:51:06 -04:00
Rob Pike
d7660143b6 doc/go1.4.html: new ports
LGTM=rsc, aram, minux
R=golang-codereviews, aram, minux, rsc
CC=golang-codereviews
https://golang.org/cl/162370045
2014-10-28 12:11:34 -07:00
Rob Pike
bd1169dd21 doc/go1.4.html: vanity imports and internal packages
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/165800043
2014-10-28 10:51:28 -07:00
Rob Pike
cd69218bdf doc/go1.4.html: much of the go command's changes
still need to do internal and import comments

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/160600043
2014-10-27 22:47:50 -07:00
Rob Pike
d39907e649 doc/go1.4.html: runtime and performance
LGTM=adg, rsc
R=golang-codereviews, adg, bradfitz, dave, rsc
CC=golang-codereviews
https://golang.org/cl/164090044
2014-10-27 20:35:34 -07:00
Rob Pike
2eb1b65830 doc/go_mem.html: don't be clever
Add a short introductory section saying what most Go
programmers really need to know, which is that you
shouldn't have to read this document to understand
the behavior of your program.

LGTM=bradfitz, adg, tracey.brendan, iant, rsc, dsymonds
R=golang-codereviews, bradfitz, tracey.brendan, adg, iant, rsc, dsymonds
CC=golang-codereviews
https://golang.org/cl/158500043
2014-10-27 17:08:50 -07:00
Robert Griesemer
ccc713c7ca spec: permit parentheses around builtin function names
Not a language change.

This is simply documenting the status quo which permits
builtin function names to be parenthesized in calls; e.g.,
both

        len(s)
and
        (((len)))(s)

are accepted by all compilers and go/types.

Changed the grammar by merging the details of BuiltinCall
with ordinary Calls. Also renamed the Call production to
Arguments which more clearly identifies that part of the
grammar and also matches better with its counterpart on
the declaration side (Parameters).

The fact that the first argument can be a type (for builtins)
or cannot be a type (for regular function calls) is expressed
in the prose, no need to make the grammar more complicated.

Fixes #9001.

LGTM=iant, r, rsc
R=r, rsc, iant, ken, dave
CC=golang-codereviews
https://golang.org/cl/160570043
2014-10-27 16:31:15 -07:00
Rob Pike
456df7c282 doc/go1.4.html: first pieces of release notes
Move the release notes into an HTML file.
Start writing the text.

LGTM=rsc
R=golang-codereviews, bradfitz, kamil.kisiel, tracey.brendan, rsc
CC=golang-codereviews
https://golang.org/cl/161350043
2014-10-27 14:23:24 -07:00
Rob Pike
a9422651f9 doc/go_faq.html: fix a couple of nits
Wrong article, one stylistic point that bothers someone (but not me).

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/156680043
2014-10-26 11:27:55 -07:00
Rob Pike
c2b7b6d5da doc/go1.4.txt: unsafe is outside go1 compatibility guarantees
CC=golang-codereviews
https://golang.org/cl/164770043
2014-10-24 09:52:11 -07:00
Rob Pike
1415a53b75 unsafe: document that unsafe programs are not protected
The compatibility guideline needs to be clear about this even
though it means adding a clause that was not there from the
beginning. It has always been understood, so this isn't really
a change in policy, just in its expression.

LGTM=bradfitz, gri, rsc
R=golang-codereviews, bradfitz, gri, rsc
CC=golang-codereviews
https://golang.org/cl/162060043
2014-10-24 09:37:25 -07:00
Russ Cox
737a9e0da8 doc/go1.4: encoding/csv
CC=golang-codereviews
https://golang.org/cl/162140043
2014-10-24 00:48:34 -04:00
Robert Griesemer
5361b747b7 spec: minimal documention of unsafe.Pointer conversions
Per suggestion from rsc as a result of the dicussion of
(abandoned) CL 153110044.

Fixes #7192.

LGTM=r, rsc, iant
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/163050043
2014-10-23 09:45:11 -07:00
Ian Lance Taylor
b51123001f gccgo_install.html: the 4.9 release series supports Go 1.2
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/163760043
2014-10-22 20:41:13 -07:00
Brad Fitzpatrick
8ba47e3d99 doc/go1.4.txt: add compress/* Reset note
CC=golang-codereviews
https://golang.org/cl/156430043
2014-10-20 10:02:25 +02:00
Rob Pike
18c7fbdfd7 doc/go1.4.txt: flags can now be set at most once
CC=golang-codereviews
https://golang.org/cl/161820043
2014-10-19 10:33:50 -07:00
Robert Griesemer
6962c15cec spec: define "variable"
Fixes #8496.

LGTM=rsc, r, iant
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/148580043
2014-10-16 15:08:49 -07:00
Ian Lance Taylor
7c74850d76 go1.4: add note about change to bufio.SplitFunc at EOF
CC=golang-codereviews
https://golang.org/cl/159800044
2014-10-12 11:41:55 -07:00
Andrew Gerrand
f3eece7492 doc: use "keyed" instead of "tagged" in Go 1 compatibility doc
LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/156730043
2014-10-08 13:23:05 +11:00
Brad Fitzpatrick
6e8f7b4f3e doc/go1.4.txt: useless change to tickle builders
Debugging the builders and need a commit to make them run.

R=adg
CC=golang-codereviews
https://golang.org/cl/149600043
2014-10-06 22:22:47 -07:00
Rob Pike
cce2d8891a doc/go1.4.txt: GOOS suffixes require underscores to act as build tags
CC=golang-codereviews
https://golang.org/cl/151490043
2014-10-06 14:58:59 -07:00
Dmitriy Vyukov
0a6f8b042d doc/go1.4: document memory consumption reduction
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/149370043
2014-10-04 12:02:04 +04:00
Rob Pike
c4e2e0de1a doc/go1.4.txt: fmt: document printing of &map rather than just pointer
CC=golang-codereviews
https://golang.org/cl/152160043
2014-10-03 20:30:06 -07:00
Ian Lance Taylor
668ea79283 doc/go1.4: mention that we are going to need a new version of SWIG
Update #8750

CC=golang-codereviews
https://golang.org/cl/153950044
2014-10-03 18:12:05 -07:00
Rob Pike
dba2faf2c6 doc/go_faq.html: explain the policy about unused imports a little better
This new text won't stop the whining but it might focus the whining a little more.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/146680044
2014-10-01 15:25:56 -07:00
Andrew Gerrand
7210753f1f doc: document go1.3.3
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/149280044
2014-10-01 08:30:51 +10:00
Robert Griesemer
47094dcf09 spec: clarify variable declaration type rules
Not a language change.

Several inaccuracies were fixed:

1) A variable declaration may declare more than just one
variable.

2) Variable initialization follows the rules of assignments,
including n:1 assignments. The existing wording implied a 1:1
or n:n rule and generally was somewhat unspecific.

3) The rules for variable declarations with no types and
untyped initialization expressions had minor holes (issue 8088).

4) Clarified the special cases of assignments of untyped values
(we don't just have untyped constants, but also untyped bools,
e.g. from comparisons). The new wording is more direct.

To that end, introduced the notion of an untyped constant's
"default type" so that the same concept doesn't have to be
repeatedly introduced.

Fixes #8088.

LGTM=iant, r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/142320043
2014-09-30 11:44:29 -07:00
Robert Griesemer
259f0ffade spec: specify variable initialization order explicitly
The existing spec rules on package initialization were
contradictory: They specified that 1) dependent variables
are initialized in dependency order, and 2) independent
variables are initialized in declaration order. This 2nd
rule cannot be satisfied in general. For instance, for

var (
        c = b + 2
        a = 0
        b = 1
)

because of its dependency on b, c must be initialized after b,
leading to the partial order b, c. Because a is independent of
b but is declared before b, we end up with the order: a, b, c.
But a is also independent of c and is declared after c, so the
order b, c, a should also be valid in contradiction to a, b, c.

The new rules are given in form of an algorithm which outlines
initialization order explicitly.

gccgo and go/types already follow these rules.

Fixes #8485.

LGTM=iant, r, rsc
R=r, rsc, iant, ken, gordon.klaus, adonovan
CC=golang-codereviews
https://golang.org/cl/142880043
2014-09-29 12:44:50 -07:00
Rob Pike
56c4d0a5c6 doc/faq: update for 1.4
LGTM=iant
R=golang-codereviews, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/150190043
2014-09-27 11:56:54 -07:00
Russ Cox
1d9c03150e doc/go1.4: go test builds + links all test files (CL 150980043)
CC=golang-codereviews
https://golang.org/cl/144660043
2014-09-26 17:09:40 -04:00
Russ Cox
e5afecbd0e doc/go1.4: add some cmd/go changes
CC=golang-codereviews
https://golang.org/cl/143650043
2014-09-26 14:37:38 -04:00
Andrew Gerrand
706efdb12c doc: document Go 1.3.2
LGTM=r
R=r, rsc, iant, agl
https://golang.org/cl/142650045
2014-09-26 11:00:49 +10:00
Rob Pike
dff461f935 doc/gopher: add biplane.jpg
LGTM=0intro
R=golang-codereviews, 0intro
CC=golang-codereviews
https://golang.org/cl/150960043
2014-09-25 14:10:56 -07:00
Robert Griesemer
2fa3e43fae spec: clarify scope and re-use of iteration variables
Fixes #7834.

LGTM=iant, rsc, r
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/148940044
2014-09-25 12:52:05 -07:00
Robert Griesemer
bb29c5a1ed spec: clarify embedding of interfaces
Fixes #7886.

LGTM=iant, r, rsc
R=r, iant, rsc, ken
CC=golang-codereviews
https://golang.org/cl/149010043
2014-09-25 12:49:42 -07:00
Russ Cox
50c9d63459 doc/go1.4.txt: document that C sources in non-cgo packages are no longer allowed
CC=golang-codereviews
https://golang.org/cl/145890046
2014-09-24 15:10:54 -04:00
Rob Pike
1392276bfb doc/go1.4.txt: text/template comparison functions allow int==uint
CC=golang-codereviews
https://golang.org/cl/142450043
2014-09-22 12:00:37 -07:00
Rob Pike
651bb8e026 spec: add dropped comma
The proposed text in the last CL had a comma that was missing from the submitted spec.

LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/150720043
2014-09-19 14:13:51 -07:00
Robert Griesemer
b4eb22d764 spec: clarify panic behavior when deferring nil functions
Fixes #8107.

LGTM=iant, rsc, r
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/145960043
2014-09-19 13:32:07 -07:00
Russ Cox
182d1316dd cmd/go, testing: add TestMain support
Fixes #8202.

LGTM=r, bradfitz
R=r, josharian, bradfitz
CC=golang-codereviews
https://golang.org/cl/148770043
2014-09-19 13:51:06 -04:00
Russ Cox
6c7b82e336 doc/go1.4.txt: add tinyallocs change
CC=golang-codereviews
https://golang.org/cl/145050043
2014-09-17 14:50:49 -04:00
Rob Pike
a883f117a9 doc/go1.4.txt: reduced stack size
CC=golang-codereviews
https://golang.org/cl/144050043
2014-09-17 08:39:18 -07:00
Rob Pike
2107b30e58 doc/go1.4.txt: add sync/atomic.Value
CC=golang-codereviews
https://golang.org/cl/145800043
2014-09-16 21:49:10 -07:00
Rob Pike
e28746c444 doc/go1.4.txt: reflect.Type.Comparable
CC=golang-codereviews
https://golang.org/cl/138530044
2014-09-16 15:40:22 -07:00
Matthew Dempsky
6e55f7a87b doc: link directly to https://golang.org/dl/
Fixes #8705.

LGTM=adg
R=golang-codereviews, bradfitz, adg
CC=golang-codereviews
https://golang.org/cl/142890044
2014-09-12 09:15:58 +10:00
Andrew Gerrand
dc089574c4 doc: amend installation instructions
Fixes #8674.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/139320044
2014-09-09 07:35:44 +10:00
Rob Pike
31bd41e04b doc/go1.4.txt: src/pkg directory is gone.
CC=golang-codereviews
https://golang.org/cl/139310043
2014-09-07 21:55:02 -07:00
Russ Cox
220a6de47e build: adjustments for move from src/pkg to src
This CL adjusts code referring to src/pkg to refer to src.

Immediately after submitting this CL, I will submit
a change doing 'hg mv src/pkg/* src'.
That change will be too large to review with Rietveld
but will contain only the 'hg mv'.

This CL will break the build.
The followup 'hg mv' will fix it.

For more about the move, see golang.org/s/go14nopkg.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/134570043
2014-09-08 00:06:45 -04:00
Brad Fitzpatrick
36ca636fab doc: add a few http items to go1.4.txt
CC=golang-codereviews
https://golang.org/cl/132670045
2014-09-07 20:52:22 -07:00
Robin Eklind
f82097f5cf spec: Add link to rune literals from string literals when talking about escape sequences.
LGTM=gri
R=golang-codereviews, gobot, gri
CC=golang-codereviews
https://golang.org/cl/140750043
2014-09-03 10:44:33 -07:00
Robin Eklind
cac006ae5a spec: Fix indentation and remove trailing white space characters.
LGTM=gri
R=golang-codereviews, bradfitz, gri
CC=golang-codereviews
https://golang.org/cl/133330043
2014-08-30 10:27:01 -07:00
Robert Griesemer
f852034eb0 spec: move Method expr/value section near selectors
Preparation for fixing issue 5769 (method selectors
do not auto-dereference): The actual fix may require
some cleanups in all these sections, and syntactically,
method expressions and method values are selector
expressions. Moving them next to each other so that
it's easy to see the actual changes (next CL).

No content changes besides the section moves.

LGTM=iant, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/132300043
2014-08-28 08:53:25 -07:00
Oling Cat
2511d92ffe doc/cmd.html: close a tag.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/130560043
2014-08-26 05:26:48 -07:00
Rob Pike
cbf351a0f2 doc/go1.4.txt: go generate
CC=golang-codereviews
https://golang.org/cl/132890043
2014-08-24 11:33:32 -07:00
Russ Cox
2e2beb567c doc/go1.4: mention pc-relative addressing on amd64
CC=golang-codereviews
https://golang.org/cl/124580043
2014-08-18 21:07:11 -04:00
Mikio Hara
0235f6854c doc: make it point to correct go1.3.1 change history
LGTM=minux, adg
R=golang-codereviews, minux, adg
CC=golang-codereviews
https://golang.org/cl/129180043
2014-08-15 08:46:16 +09:00
Rob Pike
937f0d59fc doc/go1.4.txt: cmd/go changes, syscall
CC=golang-codereviews
https://golang.org/cl/129130043
2014-08-13 14:56:58 -07:00
Andrew Gerrand
392bc8985e doc: remove the "the" in "the the" in the release notes
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/128170043
2014-08-13 23:20:39 +10:00
Rob Pike
8bca148a3e all: copy cmd/ld/textflag.h into pkg/GOOS_GOARCH
The file is used by assembly code to define symbols like NOSPLIT.
Having it hidden inside the cmd directory makes it hard to access
outside the standard repository.
Solution: As with a couple of other files used by cgo, copy the
file into the pkg directory and add a -I argument to the assembler
to access it. Thus one can write just
        #include "textflag.h"
in .s files.

The names in runtime are not updated because in the boot sequence the
file has not been copied yet when runtime is built. All other .s files
in the repository are updated.

Changes to doc/asm.html, src/cmd/dist/build.c, and src/cmd/go/build.go
are hand-made. The rest are just the renaming done by a global
substitution. (Yay sam).

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/128050043
2014-08-12 17:04:45 -07:00
Rob Pike
b049dc3074 doc/compat1.html: link to go.sys
You talked me into it. This and other links should be updated
once the new import paths for the subrepos are established.

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/124260043
2014-08-12 15:45:35 -07:00
Rob Pike
160b2461b6 syscall: freeze the package
Add a clause to the doc comment for the package and a
paragraph in the compatibility document explaining the
situation.

LGTM=bradfitz, adg, rsc
R=golang-codereviews, adg, bradfitz, minux, rsc
CC=golang-codereviews
https://golang.org/cl/129820043
2014-08-12 15:28:45 -07:00
Andrew Gerrand
f497885c63 doc: document go1.3.1
LGTM=r
R=r, rsc
CC=golang-codereviews
https://golang.org/cl/126060043
2014-08-13 07:39:52 +10:00
Rob Pike
5a17aaa830 doc/go1.4.txt: go.sys subrepo created
CC=golang-codereviews
https://golang.org/cl/124050043
2014-08-08 14:54:04 -07:00
Adam Langley
12666cb91d doc: add note about crypto/tls cert selection callback.
CC=golang-codereviews
https://golang.org/cl/123950043
2014-08-07 14:22:15 -07:00
Andrew Gerrand
af403c08fc doc: document new ParseMultipartForm behavior
Fixes #8403.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/123860043
2014-08-07 15:42:06 +10:00
Mikio Hara
cdf7767628 doc/go1.4.txt: add support for ALPN
LGTM=minux
R=r, agl, minux
CC=golang-codereviews
https://golang.org/cl/121340043
2014-08-07 09:28:49 +09:00
Alex Brainman
7ce3406c8f doc/go1.4.txt: implement monotonic clocks on windows
LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/126760043
2014-08-07 10:25:50 +10:00
Adam Langley
1d371a0ed2 doc/go1.4.txt: document ASN.1 behaviour change.
CC=golang-codereviews
https://golang.org/cl/116710043
2014-08-05 12:00:14 -07:00
Robert Griesemer
c0fca138d1 spec: comma-ok expressions return untyped boolean 2nd result
Technically a language change, this cleanup is a completely
backward compatible change that brings the boolean results
of comma-ok expressions in line with the boolean results of
comparisons: they are now all untyped booleans.

The implementation effort should be minimal (less than a
handfull lines of code, depending how well factored the
implementation of comma-ok expressions is).

Fixes #8189.

LGTM=iant, r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/112320045
2014-08-05 11:31:32 -07:00
Andrew Gerrand
43ad89d627 doc: drop scheme from links that are known to support HTTPS
golang.org now serves HTTPS with a valid cert, so it's reasonable
that users should click through to the HTTPS versions of *.golang.org
and other known sites.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/112650043
2014-07-25 10:28:39 +10:00
Alex Brainman
b1a3b61f0d doc/go1.4.txt: windows can do symlinks now
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/111560043
2014-07-23 16:36:29 +10:00
Russ Cox
d2d7187d31 testing: add Coverage function
I've found this very useful for generating
good test case lists for -short mode for
the disassemblers.

Fixes #7959.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/98150043
2014-07-22 22:56:35 -04:00
Rob Pike
81e661aa45 doc/go1.4.txt: permit for range x
CC=golang-codereviews
https://golang.org/cl/110640044
2014-07-14 15:45:14 -07:00
Robert Griesemer
20ae6d9bc5 spec: permit "for range x" (no index variables)
This is a fully backward-compatible language change.

There are not a lot of cases in the std library, but
there are some. Arguably this makes the syntax a bit
more regular - any trailing index variable that is _
can be left away, and there's some analogy to type
switches where the temporary can be left away.

Implementation-wise the change should be trivial as
it can be done completely syntactically. For instance,
the respective change in go/parser is a dozen lines
(see https://golang.org/cl/112970044 ).

Fixes #6102.

LGTM=iant, r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/104680043
2014-07-14 15:08:09 -07:00
Robin Eklind
8e902dd726 docs: Make consistent use of optional li closing tags.
LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/105100044
2014-07-09 14:26:37 -07:00
Tetsuo Kiso
48347cc1eb doc/contribute.html: capitalize the first letter
LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/109080048
2014-07-07 16:31:20 +10:00
Bill Thiede
822b2cbb33 doc/contribute: reorder documented steps to match normal workflow.
LGTM=adg
R=golang-codereviews, bradfitz, adg
CC=golang-codereviews
https://golang.org/cl/109970043
2014-07-03 17:42:23 -04:00
Rob Pike
ed5b694721 doc/go1.4.txt: delete editor and shell support
CC=golang-codereviews
https://golang.org/cl/101590043
2014-07-01 09:22:55 -07:00
Rob Pike
1abab32c65 doc/go1.4.txt: encoding/gob is now safe
CC=golang-codereviews
https://golang.org/cl/103690043
2014-06-30 12:28:20 -07:00
Russ Cox
89f185fe8a all: remove 'extern register M *m' from runtime
The runtime has historically held two dedicated values g (current goroutine)
and m (current thread) in 'extern register' slots (TLS on x86, real registers
backed by TLS on ARM).

This CL removes the extern register m; code now uses g->m.

On ARM, this frees up the register that formerly held m (R9).
This is important for NaCl, because NaCl ARM code cannot use R9 at all.

The Go 1 macrobenchmarks (those with per-op times >= 10 µs) are unaffected:

BenchmarkBinaryTree17              5491374955     5471024381     -0.37%
BenchmarkFannkuch11                4357101311     4275174828     -1.88%
BenchmarkGobDecode                 11029957       11364184       +3.03%
BenchmarkGobEncode                 6852205        6784822        -0.98%
BenchmarkGzip                      650795967      650152275      -0.10%
BenchmarkGunzip                    140962363      141041670      +0.06%
BenchmarkHTTPClientServer          71581          73081          +2.10%
BenchmarkJSONEncode                31928079       31913356       -0.05%
BenchmarkJSONDecode                117470065      113689916      -3.22%
BenchmarkMandelbrot200             6008923        5998712        -0.17%
BenchmarkGoParse                   6310917        6327487        +0.26%
BenchmarkRegexpMatchMedium_1K      114568         114763         +0.17%
BenchmarkRegexpMatchHard_1K        168977         169244         +0.16%
BenchmarkRevcomp                   935294971      914060918      -2.27%
BenchmarkTemplate                  145917123      148186096      +1.55%

Minux previous reported larger variations, but these were caused by
run-to-run noise, not repeatable slowdowns.

Actual code changes by Minux.
I only did the docs and the benchmarking.

LGTM=dvyukov, iant, minux
R=minux, josharian, iant, dave, bradfitz, dvyukov
CC=golang-codereviews
https://golang.org/cl/109050043
2014-06-26 11:54:39 -04:00
Robert Griesemer
187ee2cf2b spec: receiver declaration is just a parameter declaration
This CL removes the special syntax for method receivers and
makes it just like other parameters. Instead, the crucial
receiver-specific rules (exactly one receiver, receiver type
must be of the form T or *T) are specified verbally instead
of syntactically.

This is a fully backward-compatible (and minor) syntax
relaxation. As a result, the following syntactic restrictions
(which are completely irrelevant) and which were only in place
for receivers are removed:

a) receiver types cannot be parenthesized
b) receiver parameter lists cannot have a trailing comma

The result of this CL is a simplication of the spec and the
implementation, with no impact on existing (or future) code.

Noteworthy:

- gc already permits a trailing comma at the end of a receiver
  declaration:

  func (recv T,) m() {}

  This is technically a bug with the current spec; this CL will
  legalize this notation.

- gccgo produces a misleading error when a trailing comma is used:

  error: method has multiple receivers

  (even though there's only one receiver)

- Compilers and type-checkers won't need to report errors anymore
  if receiver types are parenthesized.

Fixes #4496.

LGTM=iant, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/101500044
2014-06-24 16:25:09 -07:00
Rob Pike
54375081fe doc/go1.4.txt: text/scanner: IsIdentRune
R=gri
CC=golang-codereviews
https://golang.org/cl/104340043
2014-06-24 11:09:13 -07:00
Dave Cheney
88b663b246 doc/go1.4: add note about Set{uid,gid} change
LGTM=iant
R=ruiu, iant
CC=golang-codereviews
https://golang.org/cl/107320044
2014-06-24 09:50:10 +10:00
Dmitriy Vyukov
9bfb66e962 doc: say that race detector is supported on freebsd
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/103520044
2014-06-21 20:19:49 +04:00
Dmitriy Vyukov
fd234d6823 doc: say that race detector is supported on freebsd
LGTM=ruiu
R=golang-codereviews, ruiu
CC=golang-codereviews
https://golang.org/cl/109100046
2014-06-21 20:19:32 +04:00
Andrew Gerrand
c70c20db67 doc: document Go 1.3
This is a clone of 101370043, which I accidentally applied to the
release branch first.
No big deal, it needed to be applied there anyway.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/108090043
2014-06-19 10:26:57 +10:00
Andrew Gerrand
7d3be61386 doc: link to new downloads page
LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/102340044
2014-06-13 16:34:52 +10:00
Rob Pike
e209a0fa06 time: micro symbol for microseconds
R=rsc
CC=golang-codereviews
https://golang.org/cl/105930043
2014-06-12 17:19:33 -07:00
Russ Cox
3a6de21ae1 doc: add go1.4.txt
CC=golang-codereviews
https://golang.org/cl/103340046
2014-06-12 20:06:16 -04:00
Alan Donovan
0476693eaf doc: add release note for 'godoc -analysis'
Contains a link to /lib/godoc/analysis/help.html
       which is not yet live.

LGTM=r
R=r, adg
CC=golang-codereviews
https://golang.org/cl/88560044
2014-06-12 10:08:54 -04:00
Andrew Gerrand
d131ffefad doc: link to release history from /doc/
Fixes #8168.

TBR=bradfitz
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/107950043
2014-06-12 13:31:13 +10:00
Rob Pike
b91d2339bb docs: link to the assembler document from the Documents tab
Fixes #8156.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/108840045
2014-06-10 11:19:53 -07:00
Rob Pike
761dacee62 doc/install.html: fix erroneous HTML annotation
align=middle is invalid; use align=center

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/106910044
2014-06-10 11:19:41 -07:00
Dmitriy Vyukov
81a93ef24a doc: fix happens-before rules for buffered channels
The current wording is reversed in 2 places.
Not sure how it got 4 LGTMs (mine was there as well).
Update #6242.

LGTM=dan.kortschak, r, rsc
R=golang-codereviews, 0xjnml, dan.kortschak, r, rsc
CC=golang-codereviews
https://golang.org/cl/101980047
2014-06-05 21:08:28 +04:00
Shenghou Ma
ae1b5c7bd9 doc/install-source.html: document that GO386 will be auto-detected when building on both 386 and amd64.
Fixes #8152.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/102150046
2014-06-04 19:53:37 -04:00
Ian Lance Taylor
06b67f304e doc: mention WriteHeapDump in 1.3 release notes
LGTM=r
R=khr, r
CC=golang-codereviews
https://golang.org/cl/103810044
2014-06-02 11:05:46 -07:00
Shenghou Ma
8c9923d5e2 doc/contrib.html: update links, mailing lists and link to 1.3 release note.
LGTM=adg
R=golang-codereviews, r, adg
CC=golang-codereviews
https://golang.org/cl/102020045
2014-06-01 22:48:57 -04:00
Russ Cox
c038c38ac1 doc/go1.3.html: math/big's Int and Rat implement TextMarshaler, TextUnmarshaler
Update #8112

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/95640043
2014-05-28 15:48:35 -04:00
Russ Cox
0782ee3ad5 cmd/cgo: given typedef struct S T, make C.T and C.struct_S interchangeable
For incomplete struct S, C.T and C.struct_S were interchangeable in Go 1.2
and earlier, because all incomplete types were interchangeable
(even C.struct_S1 and C.struct_S2).

CL 76450043, which fixed issue 7409, made different incomplete types
different from Go's point of view, so that they were no longer completely
interchangeable.

However, imprecision about C.T and C.struct_S - really the same
underlying C type - is the one behavior enabled by the bug that
is most likely to be depended on by existing cgo code.
Explicitly allow it, to keep that code working.

Fixes #7786.

LGTM=iant, r
R=golang-codereviews, iant, r
CC=golang-codereviews
https://golang.org/cl/98580046
2014-05-28 14:04:31 -04:00
Robert Griesemer
94849d5a78 spec: clarify that break/continue do not work across function boundaries
Also made it extra clear for goto statements (even though label scopes
are already limited to the function defining a label).

Fixes #8040.

LGTM=r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/99550043
2014-05-28 08:43:47 -07:00
Keith Randall
4b3019b17c doc: mention that reflect.SetMapIndex no longer panics
when deleting from a nil map.  See issue 8051.

LGTM=r
R=golang-codereviews, r, khr
CC=golang-codereviews
https://golang.org/cl/96540051
2014-05-23 17:39:58 -07:00
Robert Griesemer
2c83f1eaf9 spec: explicitly disallow blank methods in interface types
The spec was unclear about whether blank methods should be
permitted in interface types. gccgo permits at most one, gc
crashes if there are more than one, go/types permits at most
one.

Discussion:

Since method sets of non-interface types never contain methods
with blank names (blank methods are never declared), it is impossible
to satisfy an interface with a blank method.

It is possible to declare variables of assignable interface types
(but not necessarily identical types) containing blank methods, and
assign those variables to each other, but the values of those
variables can only be nil.

There appear to be two "reasonable" alternatives:

1) Permit at most one blank method (since method names must be unique),
and consider it part of the interface. This is what appears to happen
now, with corner-case bugs. Such interfaces can never be implemented.

2) Permit arbitrary many blank methods but ignore them. This appears
to be closer to the handling of blank identifiers in declarations.
However, an interface type literal is not a declaration (it's a type
literal). Also, for struct types, blank identifiers are not ignored;
so the analogy with declarations is flawed.

Both these alternatives don't seem to add any benefit and are likely
(if only slightly) more complicated to explain and implement than
disallowing blank methods in interfaces altogether.

Fixes #6604.

LGTM=r, rsc, iant
R=r, rsc, ken, iant
CC=golang-codereviews
https://golang.org/cl/99410046
2014-05-22 12:23:25 -07:00
Russ Cox
8d8dab34eb doc/go1.3.html: change uintptr to integer in unsafe.Pointer section
The key property here is what the bit pattern represents,
not what its type is. Storing 5 into a pointer is the problem.
Storing a uintptr that holds pointer bits back into a pointer
is not as much of a problem, and not what we are claiming
the runtime will detect.

Longer discussion at
https://groups.google.com/d/msg/golang-nuts/dIGISmr9hw0/0jO4ce85Eh0J

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/98370045
2014-05-22 11:45:03 -04:00
Emil Hessman
52abddb712 doc: fix typo in sharemem codewalk
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/98460045
2014-05-21 14:34:20 -07:00
Robert Griesemer
c00043b5d8 spec: specify order of init() calls
The spec did not specify the order in which
init() functions are called. Specify that
they are called in source order since we have
now also specified the initialization order
of independent variables.

While technically a language change, no
existing code could have relied on this,
so this should not break anything.

Per suggestion from rsc.

LGTM=r, iant
R=rsc, iant, r, ken
CC=golang-codereviews
https://golang.org/cl/98420046
2014-05-20 17:46:08 -07:00
Robert Griesemer
a43669843b spec: clarify section on package initialization
- split description of package initialization and
  program execution
- better grouping of concerns in section on package
  initialization
- more explicit definition of what constitues a
  dependency
- removed language about constant dependencies -
  they are computed at compile-time and not
  initialized at run-time
- clarified that independent variables are initialized
  in declaration order (rather than reference order)

Note that the last clarification is what distinguishes
gc and gccgo at the moment: gc uses reference order
(i.e., order in which variables are referenced in
initialization expressions), while gccgo uses declaration
order for independent variables.

Not a language change. But adopting this CL will
clarify what constitutes a dependency.

Fixes #6703.

LGTM=adonovan, r, iant, rsc
R=r, rsc, iant, ken, adonovan
CC=golang-codereviews
https://golang.org/cl/99020043
2014-05-20 13:51:39 -07:00
Rob Pike
4d36ad7791 doc/go_spec.html: fix broken anchor tag
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/99420045
2014-05-20 11:57:58 -07:00
Rob Pike
87ef6e9156 doc/install.html: fix duplicate id= tag
LGTM=minux.ma
R=adg, minux.ma
CC=golang-codereviews
https://golang.org/cl/95540045
2014-05-20 11:57:21 -07:00
Shenghou Ma
ca6be91cbc all: fix "the the" typos.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/93470043
2014-05-20 14:42:07 -04:00
Russ Cox
7ef0eb1cba doc/go1.3.html: mention cgo [0]byte bug fix fallout
Fixes #7958.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/91590044
2014-05-20 13:38:45 -04:00
Mikio Hara
66f72f8a50 doc/go1.3.html: switch default stack size back to 8kB
Update #8030

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/94680043
2014-05-20 14:48:23 +09:00
Elias Naur
88d07b2cbc cmd/cgo: document CC_FOR_TARGET and CXX_FOR_TARGET
Update #4714

LGTM=iant, minux.ma, rsc
R=rsc, iant, r, minux.ma
CC=golang-codereviews
https://golang.org/cl/100390043
2014-05-20 01:32:31 -04:00
Russ Cox
6aee29648f runtime: switch default stack size back to 8kB
The move from 4kB to 8kB in Go 1.2 was to eliminate many stack split hot spots.

The move back to 4kB was predicated on copying stacks eliminating
the potential for hot spots.

Unfortunately, the fact that stacks do not copy 100% of the time means
that hot spots can still happen under the right conditions, and the slowdown
is worse now than it was in Go 1.2. There is a real program in issue 8030 that
sees about a 30x slowdown: it has a reflect call near the top of the stack
which inhibits any stack copying on that segment.

Go back to 8kB until stack copying can be used 100% of the time.

Fixes #8030.

LGTM=khr, dave, iant
R=iant, khr, r, bradfitz, dave
CC=golang-codereviews
https://golang.org/cl/92540043
2014-05-20 00:30:46 -04:00
Robert Griesemer
7f1d62dcef spec: clarify when a program exits
Fixes #8023.

LGTM=rsc
R=r, iant, ken, rsc
CC=golang-codereviews
https://golang.org/cl/98340043
2014-05-19 08:54:19 -07:00
Aram Hăvărneanu
5b76f0ce3c doc/go1.3.html: minor tweak of Solaris wording
Discussion here: https://golang.org/cl/100490044/#msg14

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/98350043
2014-05-19 08:02:07 -07:00
Mikio Hara
77dd411aed doc/go1.3.html: fix typo
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/92440043
2014-05-18 05:57:40 +09:00
Mikio Hara
37323fe05e doc/go1.3.html: update the state of supported platforms
LGTM=r
R=golang-codereviews, aram, 0intro, gobot, r
CC=golang-codereviews
https://golang.org/cl/100490044
2014-05-17 06:54:05 +09:00
Ian Lance Taylor
2a627da326 spec: clarify that newlines are kept in raw string literals
Fixes #8007.

LGTM=r
R=gri, r
CC=golang-codereviews
https://golang.org/cl/91510044
2014-05-16 12:20:03 -07:00
Russ Cox
d1f627f2f3 doc/go1.3.html: add note about small map iteration order
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/98290048
2014-05-16 12:15:21 -04:00
Mikio Hara
1704368c5d doc/go1.3.html: add syscall.SendmsgN
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/93430044
2014-05-16 13:18:14 +09:00
Russ Cox
208a1ea564 doc/go1.3.html: add note about unsafe.Pointer strictness
The vet check is in CL 10470044.

LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://golang.org/cl/91480044
2014-05-15 16:16:26 -04:00
Rob Pike
1476686cdb doc/effective_go.html: a little more about errors
Make it a little clearer how they are used, in particular that
it is not enough just to return a nil pointer on error, but also
to return an error value explaining the problem.

Fixes #1963.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/97360045
2014-05-14 13:46:58 -07:00
Robert Griesemer
61d8a33719 spec: more precise description of select statement
- use previously defined terms (with links) throughout
- specify evaluation order more precisely (in particular,
  the evaluation time of rhs expressions in receive cases
  was not specified)
- added extra example case

Not a language change.

Description matches observed behavior of code compiled
with gc and gccgo.

Fixes #7669.

LGTM=iant, r, rsc
R=r, rsc, iant, ken, josharian
CC=golang-codereviews
https://golang.org/cl/91230043
2014-05-14 11:47:19 -07:00
Ian Lance Taylor
02cc45aded cmd/go: link SWIG objects directly rather than using a shared library
This change requires using SWIG version 3.0 or later.  Earlier
versions of SWIG do not generate the pragmas required to use
the external linker.

Fixes #7155.
Fixes #7156.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/97120046
2014-05-12 12:43:51 -07:00
Russ Cox
21e75b3251 testing: write profiles on failure
Fixes #7901.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/90930044
2014-05-09 12:18:50 -04:00
Shenghou Ma
f5a4d241cd doc/install.html: update wrt to OS and compiler support.
Update #7188
Fixes #7894.

LGTM=alex.brainman, bradfitz, r
R=golang-codereviews, alex.brainman, mikioh.mikioh, gobot, r, bradfitz
CC=golang-codereviews
https://golang.org/cl/95870043
2014-05-08 01:25:28 -04:00
Robert Griesemer
97aa90d251 spec: several clarifications to language on channels
- A channel may be used between any number of goroutines,
  not just two.
- Replace "passing a value" (which is not further defined)
  by "sending and receiving a value".
- Made syntax production more symmetric.
- Talk about unbuffered channels before buffered channels.
- Clarify what the comma,ok receive values mean (issue 7785).

Not a language change.

Fixes #7785.

LGTM=rsc, r, iant
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/94030045
2014-05-07 10:40:39 -07:00
Robert Griesemer
dbe5f88804 spec: remove evaluation order inconsistency
This is a clarification of what happens already.
Not a language change.

Fixes #7137.

LGTM=iant, r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/96000044
2014-05-07 08:50:52 -07:00
Robert Griesemer
6f3b84a757 spec: clarify type properties
If the underlying type of a type T is a boolean, numeric,
or string type, then T is also a boolean, numeric, or
string type, respectively.

Not a language change.

Fixes #7551.

LGTM=iant, rsc, robert.hencke, r
R=r, rsc, iant, ken, robert.hencke
CC=golang-codereviews
https://golang.org/cl/100130044
2014-05-07 08:42:08 -07:00
Dmitriy Vyukov
2e1ddeb136 doc: replace absolute links to golang.org with relative links
Currently tip.golang.org leads to golang.org and
local godoc also leads to golang.org (when you don't have internet connectivity).

LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews
https://golang.org/cl/100200043
2014-05-07 18:49:13 +04:00
David Crawshaw
2702ad3806 doc/go1.3.html: mention go build -i
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews, r
https://golang.org/cl/95010049
2014-05-06 21:10:36 -04:00
Andrew Gerrand
696a7e1595 doc: refer to wiki page for downloads
We will serve downloads from here until we work out a better plan.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/95980044
2014-05-05 14:31:26 -07:00
Andrew Gerrand
4ad7c4a1ce doc: document go1.2.2
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/100110043
2014-05-05 09:56:26 -07:00
Shenghou Ma
74dccea2f2 doc/go1.3.html: update for FreeBSD/ARM support.
FreeBSD 10 is fully supported.

LGTM=r
R=golang-codereviews, bradfitz, r
CC=dave, golang-codereviews
https://golang.org/cl/99810044
2014-04-29 15:54:37 -04:00
Robert Hencke
1bf690c180 doc: fix link to Mercurial download
Oddly, 404s with the trailing slash.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/90790045
2014-04-28 06:59:27 -07:00
Robert Hencke
a9288d63ef doc: fix broken link to RTEMS Go wiki page
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/98740046
2014-04-28 06:27:22 -07:00
Brad Fitzpatrick
6607534d08 doc: fix an article
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/91770050
2014-04-27 07:40:48 -07:00
Rob Pike
2674efbdf4 doc/debugging_with_gdb.html: add introductory disclaimer
The instructions in this document are useful but not reliable.
Explain the situation up top.

Fixes #7471.

LGTM=josharian, iant
R=golang-codereviews, josharian, iant
CC=golang-codereviews
https://golang.org/cl/96830045
2014-04-26 10:18:17 -06:00
Robert Hencke
75ba181841 doc/contribute.html: link to wiki for more code review information
(from the discussions on CL 89650044)

LGTM=minux.ma, iant
R=iant, minux.ma
CC=golang-codereviews
https://golang.org/cl/97770043
2014-04-25 20:09:04 -07:00
David du Colombier
f187675041 doc/go1.3.html: fix Goexit link
LGTM=minux.ma
R=r, minux.ma
CC=golang-codereviews
https://golang.org/cl/89710043
2014-04-20 20:29:17 +02:00
David du Colombier
75b74ea8ff doc/go1.3.html: Plan 9 support
LGTM=aram, r
R=r, aram, bradfitz
CC=golang-codereviews, rsc
https://golang.org/cl/89130045
2014-04-18 21:40:55 +02:00
Rob Pike
0d612a8572 doc/go1.3.html: go test always builds
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/89370043
2014-04-18 11:00:38 -07:00
David du Colombier
ba59375750 doc/go1.3.html: new package debug/plan9obj
LGTM=r
R=r
CC=golang-codereviews, rsc
https://golang.org/cl/86180046
2014-04-18 10:50:06 +02:00
Shenghou Ma
f8f34c330c doc/effective_go: mention that b.Write is a shorthand for (&b).Write when b is addressable.
The rewrite is due to Rob.

LGTM=r, bradfitz, josharian
R=golang-codereviews, bradfitz, r, josharian
CC=golang-codereviews
https://golang.org/cl/87410043
2014-04-17 01:40:04 -04:00
Emil Hessman
3af8d6fa4a doc/go1.3.html: fix id anchor for FreeBSD
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/88000047
2014-04-16 12:15:39 -07:00
Rob Pike
59f6c81f98 doc/go1.3.html: document the state of FreeBSD
Update #7056

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/88070045
2014-04-16 10:40:41 -07:00
Russ Cox
ade6bc68b0 runtime: crash when func main calls Goexit and all other goroutines exit
This has typically crashed in the past, although usually with
an 'all goroutines are asleep - deadlock!' message that shows
no goroutines (because there aren't any).

Previous discussion at:
https://groups.google.com/d/msg/golang-nuts/uCT_7WxxopQ/BoSBlLFzUTkJ
https://groups.google.com/d/msg/golang-dev/KUojayEr20I/u4fp_Ej5PdUJ
http://golang.org/issue/7711

There is general agreement that runtime.Goexit terminates the
main goroutine, so that main cannot return, so the program does
not exit.

The interpretation that all other goroutines exiting causes an
exit(0) is relatively new and was not part of those discussions.
That is what this CL changes.

Thankfully, even though the exit(0) has been there for a while,
some other accounting bugs made it very difficult to trigger,
so it is reasonable to replace. In particular, see golang.org/issue/7711#c10
for an examination of the behavior across past releases.

Fixes #7711.

LGTM=iant, r
R=golang-codereviews, iant, dvyukov, r
CC=golang-codereviews
https://golang.org/cl/88210044
2014-04-16 13:12:18 -04:00
Shenghou Ma
c91c564e83 doc/debugging_with_gdb: use -w to strip debug info.
Don't advertise -s anymore.
Fixes #7793.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/88030045
2014-04-16 01:19:26 -04:00
Shenghou Ma
6037841dbd doc: remove outdated Makefile
Fixes #7773.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/87400043
2014-04-16 00:00:25 -04:00
Russ Cox
e97b3ab1f9 build: remove tmp dir names from objects, support GOROOT_FINAL again
If we compile a generated file stored in a temporary
directory - let's say /tmp/12345/work/x.c - then by default
6c stores the full path and then the pcln table in the
final binary includes the full path. This makes repeated builds
(using different temporary directories) produce different
binaries, even if the inputs are the same.

In the old 'go tool pack', the P flag specified a prefix to remove
from all stored paths (if present), and cmd/go invoked
'go tool pack grcP $WORK' to remove references to the
temporary work directory.

We've changed the build to avoid pack as much as possible,
under the theory that instead of making pack convert from
.6 to .a, the tools should just write the .a directly and save a
round of I/O.

Instead of going back to invoking pack always, define a common
flag -trimpath in the assemblers, C compilers, and Go compilers,
implemented in liblink, and arrange for cmd/go to use the flag.
Then the object files being written out have the shortened paths
from the start.

While we are here, reimplement pcln support for GOROOT_FINAL.
A build in /tmp/go uses GOROOT=/tmp/go, but if GOROOT_FINAL=/usr/local/go
is set, then a source file named /tmp/go/x.go is recorded instead as
/usr/local/go/x.go. We use this so that we can prepare distributions
to be installed in /usr/local/go without actually working in that
directory. The conversion to liblink deleted all the old file name
handling code, including the GOROOT_FINAL translation.
Bring the GOROOT_FINAL translation back.

Before this CL, using GOROOT_FINAL=/goroot make.bash:

        g% strings $(which go) | grep -c $TMPDIR
        6
        g% strings $(which go) | grep -c $GOROOT
        793
        g%

After this CL:

        g% strings $(which go) | grep -c $TMPDIR
        0
        g% strings $(which go) | grep -c $GOROOT
        0
        g%

(The references to $TMPDIR tend to be cgo-generated source files.)

Adding the -trimpath flag to the assemblers required converting
them to the new Go-semantics flag parser. The text in go1.3.html
is copied and adjusted from go1.1.html, which is when we applied
that conversion to the compilers and linkers.

Fixes #6989.

LGTM=iant
R=r, iant
CC=golang-codereviews
https://golang.org/cl/88300045
2014-04-15 20:46:46 -04:00
Rob Pike
c8ef6776e4 doc/install.html: FreeBSD 8 and higher only are supported
Fixes #7188

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/88280044
2014-04-15 16:40:48 -07:00
Rob Pike
edebe10864 doc/asm.html: remove mention of 6l -a
Also make it clear this is not a complete description of all features.
Fixes #7790.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/88300044
2014-04-15 16:27:48 -07:00
Brad Fitzpatrick
632e641fd2 doc: simplify a go1.3 change description
LGTM=r
R=rsc, r
CC=golang-codereviews
https://golang.org/cl/87750043
2014-04-14 16:28:52 -07:00
Andrew Szeto
8a2ac83cd8 doc/help.html: fix typo in word order
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/87460043
2014-04-14 13:03:03 -07:00
Brad Fitzpatrick
071a0f4d18 doc: add go1.3 note about the http Transport closing Request.Body
LGTM=rsc
R=rsc, r
CC=golang-codereviews
https://golang.org/cl/87620043
2014-04-14 10:19:10 -07:00
Rob Pike
e9ad3bf0ff doc/go1.3.html: windows NewCallbackCDecl
LGTM=alex.brainman
R=alex.brainman
CC=golang-codereviews
https://golang.org/cl/87250043
2014-04-12 14:56:17 +10:00
Rob Pike
1d879fe774 doc/go1.3.html: fix spelling mistakes
Keep those builders busy.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/85710046
2014-04-11 08:52:16 +10:00
Brad Fitzpatrick
1e68e6ae21 doc: finish net/http notes in go1.3.html
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/86580043
2014-04-10 15:09:59 -07:00
Rob Pike
b6684b3104 doc/go1.3.html: minor changes: crypto, net
All that's left is net/http and the stuff I need help describing: FreeBSD and Windows.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/86320043
2014-04-10 14:17:48 +10:00
Russ Cox
c9133e32f6 doc: tweak Solaris wording
Suggested in comments on CL 85740043.

LGTM=aram
R=golang-codereviews, aram
CC=dave, golang-codereviews, r
https://golang.org/cl/85990044
2014-04-09 10:08:35 -04:00
Rob Pike
56294f4adf doc/go1.3.html: go command, major library changes
LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/85840043
2014-04-09 15:20:00 +10:00
Rob Pike
b69238bfbe doc/go1.3.html: gc precision, nacl, solaris
LGTM=rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/85740043
2014-04-09 12:47:35 +10:00
Brad Fitzpatrick
4f193cdc5d doc: add a couple net/http go1.3 items
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/85760043
2014-04-08 19:46:33 -07:00
Rob Pike
96775a3688 doc/go1.3.html: gccgo status
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/85720043
2014-04-09 09:45:39 +10:00
Rob Pike
c5f14c55c1 doc/go1.3.html: linker, go command, miscellany
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/85660043
2014-04-09 08:19:35 +10:00
Rob Pike
969dc7626b doc/go1.3.html: Performance, plus some library details
LGTM=dvyukov, iant, rsc
R=golang-codereviews, dvyukov, iant, rsc
CC=golang-codereviews
https://golang.org/cl/85250043
2014-04-09 07:12:20 +10:00
Rob Pike
78025fb220 doc/go1.3.html: drop support for windows 2000
LGTM=bradfitz, alex.brainman
R=golang-codereviews, bradfitz, alex.brainman
CC=golang-codereviews
https://golang.org/cl/85190043
2014-04-08 14:07:17 +10:00
Andrew Gerrand
3929967156 build: remove depdenency on GNU make
LGTM=bradfitz
R=bradfitz
CC=golang-codereviews
https://golang.org/cl/84920043
2014-04-07 11:34:35 +10:00
Rob Pike
610f395189 doc/go1.3.html: contiguous stacks
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/81650043
2014-03-28 12:55:37 +11:00
Rob Pike
a4380927eb doc/go1.3.html: explain the change to the memory model
LGTM=iant, rsc
R=rsc, iant, mtj
CC=golang-codereviews
https://golang.org/cl/80260044
2014-03-27 11:45:51 +11:00
Mikio Hara
34767046d7 doc: document DragonFly BSD port
LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/80120044
2014-03-26 14:06:18 +09:00
Shenghou Ma
708a53f9cf doc: document Solaris port.
LGTM=aram, rsc
R=aram, adg, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/74750045
2014-03-25 23:21:28 -04:00
Rob Pike
09e1da3c2c doc/go1.3.html: new release document outline
Almost all TODOS, but the structure is there and it has the details
from go1.3.txt, which is hereby deleted.

LGTM=dominik.honnef, adg
R=golang-codereviews, dominik.honnef, adg
CC=golang-codereviews
https://golang.org/cl/80240044
2014-03-26 13:56:16 +11:00
Andrew Gerrand
c5e7a02e80 doc/gopher: fix typo in README
LGTM=josharian
R=golang-codereviews, josharian
CC=golang-codereviews
https://golang.org/cl/80220043
2014-03-26 11:23:33 +11:00
Andrew Gerrand
8c9e838f7b doc/gopher: add README
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/79890046
2014-03-26 10:24:57 +11:00
Russ Cox
132e816734 doc: allow buffered channel as semaphore without initialization
This rule not existing has been the source of many discussions
on golang-dev and on issues. We have stated publicly that it is
true, but we have never written it down. Write it down.

Fixes #6242.

LGTM=r, dan.kortschak, iant, dvyukov
R=golang-codereviews, r, dominik.honnef, dvyukov, dan.kortschak, iant, 0xjnml
CC=golang-codereviews
https://golang.org/cl/75130045
2014-03-24 19:11:21 -04:00
Rob Pike
287967f74c doc/go_faq.html: update description of stack management
They aren't segmented any more, at least with gc.
Also improve the comparison of goroutines and threads.
Fixes #7373.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/77950044
2014-03-21 13:59:30 +11:00
Rob Pike
0c8415699e doc/effective_go.html: fix typo
Prose referred to 'b', code used 'buf'.
Fixes #7601.

LGTM=dominik.honnef
R=golang-codereviews, dominik.honnef
CC=golang-codereviews
https://golang.org/cl/78470043
2014-03-21 08:37:27 +11:00
Rick Arnold
1f1f69e389 build: fix race in doc/articles/wiki test
The original test would open a local port and then immediately close it
and use the port number in subsequent tests. Between the port being closed
and reused by the later process, it could be opened by some other program
on the machine.

Changed the test to run the server process directly and have it save the
assigned port to a text file to be used by client processes.

Fixes #5564.

LGTM=adg
R=golang-codereviews, gobot, adg
CC=golang-codereviews
https://golang.org/cl/72290043
2014-03-18 13:03:03 +11:00
Nathan John Youngman
d5f208c874 doc: Revise Contribution Guidelines.
Smooth out the setup process for new contributors.

* Remove references $GOROOT (often not defined).
* Add a note for contributing to subrepositories.
* Emphasize that hg mail also uploads the latest copy.

LGTM=adg
R=golang-codereviews, iant, adg
CC=golang-codereviews
https://golang.org/cl/74370043
2014-03-17 09:35:04 +11:00
Dmitriy Vyukov
cdc93d2416 doc: update go1.3.txt for some performance changes
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/75350043
2014-03-13 19:03:41 +04:00
Brad Fitzpatrick
15068b6df7 doc: update go1.3.txt for regexp change
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/72640043
2014-03-12 14:23:40 -07:00
Russ Cox
b11aeef912 doc/go1.3.txt: add notes about copying stacks, win2k support
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/74800043
2014-03-12 16:32:35 -04:00
Robert Griesemer
6ffd235161 spec: clarify when constant slice indices must be in range
This documents the status quo for most implementations,
with one exception: gc generates a run-time error for
constant but out-of-range indices when slicing a constant
string. See issue 7200 for a detailed discussion.

LGTM=r
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/72160044
2014-03-06 17:11:13 -08:00
Robert Griesemer
a766277742 spec: clarify value passed for final parameter of variadic functions
NOT A LANGUAGE CHANGE.

Fixes #7073.

LGTM=r
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/68840045
2014-03-06 10:35:05 -08:00
Robert Griesemer
8d77d2c8f0 spec: be more precise about underlying types of predeclared types
The underlying type of the predeclared type error is not itself,
but the interface it is defined as.

Fixes #7444.

LGTM=r, rsc
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/71790044
2014-03-05 19:37:44 -08:00
Rob Pike
3a7fe36d66 doc/go_faq.html: reference the new wiki page titled Go Code Review Comments
Fixes #7449.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/71610044
2014-03-06 13:15:09 +11:00
Brad Fitzpatrick
967901a396 doc: update links in contribute.html
CLA links are now redirects. Use new URLs instead.

Also, use https:// links for all Google sites where
the http version just redirects to https anyway.
(That's all links on the page, as it turns out)

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://golang.org/cl/69980051
2014-03-05 14:09:03 -08:00
Brad Fitzpatrick
6433bff205 net/http: minor fixes and optimization for Response.TLS
Also add it to doc/go1.3.txt.

Update #7289

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/71740043
2014-03-05 12:40:13 -08:00
Robert Griesemer
c97778f430 spec: shadowed return parameters may be disallowed
This documents the implemented behavior of both
gc and gccgo as an implementation restriction.

NOT A LANGUAGE CHANGE.

Fixes #5425.

LGTM=rsc, r, iant
R=r, iant, rsc, ken
CC=golang-codereviews
https://golang.org/cl/71430043
2014-03-05 11:59:53 -08:00
Robert Griesemer
871698136d spec: clarify what is considered a function call for len/cap special case
gccgo considers built-in function calls returning a constant not as function call (issue 7386)
go/types considers any call (regular or built-in) as a function call

The wording and examples clarify that only "function calls" that are issued
at run-time (and thus do not result in a constant result) are considered
function calls in this case.

gc is inconsistent (issue 7385)
gccgo already interprets the spec accordingly and issue 7386 is moot.
go/types considers all calls (constant or not) as function calls (issue 7457).

Fixes #7387.
Fixes #7386.

LGTM=r, rsc, iant
R=r, rsc, iant, ken
CC=golang-codereviews
https://golang.org/cl/66860046
2014-03-03 20:07:34 -08:00
Mikio Hara
df8b63780b doc: add freebsd items
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/71000043
2014-03-04 10:53:24 +09:00
Andrew Gerrand
77edde1a1e doc: document Go 1.2.1
LGTM=minux.ma
R=golang-codereviews, minux.ma
CC=golang-codereviews
https://golang.org/cl/69970047
2014-03-03 11:26:18 +11:00
Brad Fitzpatrick
c535ce8506 doc: add more go1.3.txt items, sort.
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/70120044
2014-02-28 14:17:33 -08:00
Robert Griesemer
a36b5b99cc spec: slightly rephrased wording on parsing ambiguity for composite literals
Fixes #4482.

LGTM=r
R=r, iant, rsc, ken
CC=golang-codereviews
https://golang.org/cl/69020045
2014-02-27 08:57:30 -08:00
Andrew Gerrand
66562b9698 cmd/go: remove 'go tool benchcmp' and corresponding special case
See the discussion on the original CL for context:
        https://golang.org/cl/60100043/

LGTM=josharian
R=r, josharian
CC=golang-codereviews
https://golang.org/cl/68890043
2014-02-26 13:04:39 +11:00
Rob Pike
e6863e7d5b spec: libraries and implementation are now at Unicode 6.3
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/68760043
2014-02-25 14:15:49 -08:00
Robert Griesemer
ab26623182 spec: clarify default "true" condition/tag in for/switch statements
An absent condition/tag in for and switch statements is equivalent
to the predeclared constant true; not simply the expression true
(which might lead to a locally defined true).

Not a language change.

Fixes #7404.

LGTM=iant, r
R=r, iant, rsc, ken
CC=golang-codereviews
https://golang.org/cl/68150046
2014-02-25 09:13:37 -08:00
Adam Langley
abe53f8766 doc/go1.3: note a couple more crypto changes.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/68600043
2014-02-25 10:54:09 -05:00
Russ Cox
280d46b03b cmd/go: document new -exec flag on run/test
The new flag was added by CL 68150047 (part of the NaCl replay),
but the change, like the original, omitted documentation of the
new behavior.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/68580043
2014-02-25 10:22:27 -05:00
Adam Langley
fca335e91a crypto/tls: enforce that either ServerName or InsecureSkipVerify be given.
crypto/tls has two functions for creating a client connection: Dial,
which most users are expected to use, and Client, which is the
lower-level API.

Dial does what you expect: it gives you a secure connection to the host
that you specify and the majority of users of crypto/tls appear to work
fine with it.

Client gives more control but needs more care. Specifically, if it
wasn't given a server name in the tls.Config then it didn't check that
the server's certificates match any hostname - because it doesn't have
one to check against. It was assumed that users of the low-level API
call VerifyHostname on the certificate themselves if they didn't supply
a hostname.

A review of the uses of Client both within Google and in a couple of
external libraries has shown that nearly all of them got this wrong.

Thus, this change enforces that either a ServerName or
InsecureSkipVerify is given. This does not affect tls.Dial.

See discussion at https://groups.google.com/d/msg/golang-nuts/4vnt7NdLvVU/b1SJ4u0ikb0J.

Fixes #7342.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/67010043
2014-02-21 15:56:41 -05:00
Russ Cox
e56c6e7535 runtime/debug: add SetPanicOnFault
SetPanicOnFault allows recovery from unexpected memory faults.
This can be useful if you are using a memory-mapped file
or probing the address space of the current program.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/66590044
2014-02-20 16:18:05 -05:00
Rob Pike
ad4601d1c3 doc/go1.3.txt: unicode upgrade to 6.3.0
LGTM=mpvl
R=mpvl
CC=golang-codereviews
https://golang.org/cl/65550044
2014-02-18 11:50:38 -08:00
Dmitriy Vyukov
c3922f0a63 testing: ease writing parallel benchmarks
Add b.RunParallel function that captures parallel benchmark boilerplate:
creates worker goroutines, joins worker goroutines, distributes work
among them in an efficient way, auto-tunes grain size.
Fixes #7090.

R=bradfitz, iant, josharian, tracey.brendan, r, rsc, gobot
CC=golang-codereviews
https://golang.org/cl/57270043
2014-02-17 06:29:56 +04:00
Carlos Castillo
7861cd6082 cmd/go, go/build: support .m files
go/build is changed to list the .m files in a package, and match them for build constraints, adding them to a new field: Package.MFiles.

The go tool is changed to support building .m files and linking in the results during CGO and SWIG builds. This means packages that create a C interface to calls Objective-C code from go are now go-gettable without producing and distributing .syso files. This change is analogous to the one in Go 1.2 made to support C++ built code.

This change doesn't support .mm files (Objective C++).

Also added support for these MFiles to go list's -json mode.

Fixes #6536.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/60590044
2014-02-13 10:11:44 -08:00
Andrew Gerrand
d908ae17b2 doc: remove "Code that grows with grace" video from front page
It was deleted from Vimeo. I will attempt to get a new version online.

Fixes #7297.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/61740043
2014-02-11 16:00:44 +11:00
Andrew Gerrand
ae5bed04c3 doc: restore race detector manual
This got deleted mistakenly during the content re-org.

Fixes #7275.

LGTM=dvyukov
R=golang-codereviews, minux.ma, dvyukov
CC=golang-codereviews
https://golang.org/cl/60850043
2014-02-11 09:26:34 +11:00
Shenghou Ma
2b6eb111e2 doc/install.html: get rid of explicit version number in docs.
So that we don't need to update the file each time a new version is released.

LGTM=dave, r, adg
R=golang-codereviews, dave, josharian, gobot, adg, r
CC=golang-codereviews
https://golang.org/cl/48730043
2014-02-06 16:09:01 -05:00
Josh Bleecher Snyder
57bc80b5e8 cmd/go, doc/go1.3.txt: misc/benchcmp has been replaced by go tool benchcmp
Fixes #7016.

LGTM=r
R=r
CC=adg, bradfitz, dave, golang-codereviews
https://golang.org/cl/60100043
2014-02-04 11:53:13 -08:00
Rob Pike
592415d682 effective_go: move 'Type switch' section into 'Control structures' section.
Needs to be an h3, not an h2.
Thanks to Mingjie Xing for pointing it out.

LGTM=dsymonds
R=golang-codereviews, dsymonds
CC=golang-codereviews
https://golang.org/cl/55980046
2014-01-23 16:26:42 -08:00
Russ Cox
ae56210708 testing: diagnose buggy tests that panic(nil)
Fixes #6546.

LGTM=dave, bradfitz, r
R=r, dave, bradfitz
CC=golang-codereviews
https://golang.org/cl/55780043
2014-01-22 16:04:50 -05:00
David Symonds
1e67453d93 doc: replace "private" with "unexported" in Effective Go.
R=r
CC=golang-codereviews
https://golang.org/cl/53720043
2014-01-17 09:06:39 -08:00
Dmitriy Vyukov
c0b9e6218c runtime: output how long goroutines are blocked
Example of output:

goroutine 4 [sleep for 3 min]:
time.Sleep(0x34630b8a000)
        src/pkg/runtime/time.goc:31 +0x31
main.func·002()
        block.go:16 +0x2c
created by main.main
        block.go:17 +0x33

Full program and output are here:
http://play.golang.org/p/NEZdADI3Td

Fixes #6809.

R=golang-codereviews, khr, kamil.kisiel, bradfitz, rsc
CC=golang-codereviews
https://golang.org/cl/50420043
2014-01-16 12:54:46 +04:00
Rob Pike
227fe5f64e spec: tighten the wording around . imports
Make it clear that if you do a . import, you cannot use a qualified identifier.

R=gri
CC=golang-codereviews
https://golang.org/cl/52390043
2014-01-14 15:16:01 -08:00
Brad Fitzpatrick
c0eb88029e doc: add cmd/gofmt entry to go1.3.txt
R=golang-codereviews, minux.ma
CC=golang-codereviews
https://golang.org/cl/52240043
2014-01-14 12:27:51 -08:00
Rob Pike
82e2db70f6 spec: s/and/or/ for correctness and parallelism
No change to the meaning, just bad writing found by
Doug McIlroy.
Let's start the new year off with a bang.

R=golang-codereviews, bradfitz, dave
CC=golang-codereviews
https://golang.org/cl/47110044
2014-01-04 10:52:59 -08:00