1
0
mirror of https://github.com/golang/go synced 2024-09-25 01:20:13 -06:00
Commit Graph

2152 Commits

Author SHA1 Message Date
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
Emil Hessman
13141315ad spec: Fix broken type identity link
Fixes #7003.

R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/47780043
2014-01-03 22:48:03 -08:00
David Symonds
8f3fc547d0 2014: Year of the Gopher.
R=adg, djd, mpvl, nigeltao
CC=golang-codereviews
https://golang.org/cl/46660043
2014-01-01 00:00:22 +11:00
Mihai Borobocea
8183ed19b9 spec: example shows wrong value for complex constant
Looks like a typo.
Fixes #7011.

R=golang-codereviews, r, bradfitz
CC=golang-codereviews
https://golang.org/cl/45350043
2013-12-30 13:29:56 -08:00
Shawn Smith
2f5f193923 doc/contribute: golang-dev -> golang-codereviews
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/46320043
2013-12-29 11:11:28 -08:00
Alex Brainman
e8b7def7f4 doc/go1.3.txt: mention windows syscall.NewCallbackCDecl
R=golang-codereviews, r
CC=golang-codereviews
https://golang.org/cl/44160044
2013-12-21 12:52:53 +11:00
Josh Bleecher Snyder
de4ca13eac doc: fix typo in Effective Go
R=adg, bradfitz
CC=golang-codereviews
https://golang.org/cl/44430043
2013-12-20 09:59:51 -08:00
Shenghou Ma
c184940d3f doc/install-source.html: mention make.bash to skip tests
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/42590043
2013-12-15 21:03:12 -05:00
Aram Hăvărneanu
22a7b3442e doc/articles/wiki: remove GNU make dependency
R=golang-dev, adg, minux.ma
CC=golang-dev
https://golang.org/cl/38410043
2013-12-15 17:51:03 -05:00
Ian Lance Taylor
8189605a96 doc: change "threads" to "goroutines"
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/40510049
2013-12-12 18:48:40 -08:00
Andrew Gerrand
e8a1de720f doc: add Go 1.2 to release history page
Fixes #6939.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/41540043
2013-12-13 09:31:49 +11:00
Rob Pike
0d624e1808 doc/go1.3.txt: first checkins: makerelease, liblink
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/40650047
2013-12-12 11:17:54 -08:00
Oling Cat
b349477eab doc/effective_go.html: close some tags.
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/37700043
2013-12-11 09:49:28 +11:00
Peter Collingbourne
a5cc5bab5a doc: update list of gccgo import search paths
R=iant
CC=golang-dev
https://golang.org/cl/38560043
2013-12-06 13:33:10 -08:00
Rob Pike
b204448f7e doc/go1.3.txt: add file to track significant CLs for 1.3
Nothing significant so far (right?), but let's lay the keystone.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/36830043
2013-12-03 17:08:51 -08:00
Oling Cat
07d2195c66 doc/install.html: fix a tag.
R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/30900044
2013-11-25 13:36:16 +11:00
Andrew Gerrand
c497c9ea4b doc: update installation instructions
Clarify that GOROOT should only be set when using a custom install path.
Remove NetBSD from binary install page (we don't provide binaries).
Remove "What's next" links from installation instructions.
Emphasize "How to Write Go Code" page.

Fixes #6613.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/28700043
2013-11-21 07:55:29 +11:00
Russ Cox
a664b49457 doc/asm: more about SP, ARM R11
Also rename URL to /doc/asm.

R=golang-dev, minux.ma, r
CC=golang-dev
https://golang.org/cl/26170043
2013-11-13 21:29:34 -05:00
Russ Cox
7dd086e52d encoding/gob: do not use MarshalText, UnmarshalText
This seems to be the best of a long list of bad ways to fix this issue.

Fixes #6760.

R=r
CC=golang-dev
https://golang.org/cl/22770044
2013-11-13 21:29:19 -05:00
Rob Pike
2fbcb08192 doc/asm.html: new document, a brief guide to the assembler
Fixes #6060

R=golang-dev, iant, bradfitz, josharian, minux.ma, aram, rsc
CC=golang-dev
https://golang.org/cl/20930043
2013-11-12 20:04:22 -08:00
Robert Griesemer
f57bf7a556 spec: clarify rules for blank identifiers
This documents the status quo more precisely.
Not a language change.

Fixes #6006.

R=r, rsc, iant, ken
CC=golang-dev
https://golang.org/cl/14415043
2013-11-12 21:06:54 -05:00
Andrew Gerrand
c72bce901e doc: use the same wording for OS X as the other OSes
I used "and above" when I should have said "or later".

Sorry for the churn.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/25670043
2013-11-13 11:53:01 +11:00
Andrew Gerrand
14b32ed7b2 doc: we support all recent versions of OS X
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/25370045
2013-11-13 11:35:25 +11:00
Ian Lance Taylor
8d206d9d80 doc: update note about GCC 4.8.2 in gccgo instructions
R=golang-dev, minux.ma
CC=golang-dev
https://golang.org/cl/22510043
2013-11-06 13:58:35 -08:00
Andrew Gerrand
c1ef845a71 doc/go1.2: link to cgo documentation
I know it's linked in the previous sentence, but this new link is where I want it to be while reading this sentence.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/21770043
2013-11-05 13:54:48 +11:00
Rob Pike
95ae85fb82 doc/go1.2.html: delete repeated word
TBR=rsc

R=golang-dev
CC=golang-dev
https://golang.org/cl/19840043
2013-10-30 09:39:20 -07:00
Rob Pike
0f706d39d4 doc/go1.2.html: stack sizes, thread limits
R=golang-dev, minux.ma, adg, rsc
CC=golang-dev
https://golang.org/cl/19600043
2013-10-30 08:54:53 -07:00
Andrew Gerrand
8b0fad11e5 doc: update front page summary text
R=rsc
CC=golang-dev
https://golang.org/cl/18080045
2013-10-29 15:56:38 +09:00
Robert Griesemer
15da997c7e spec: clarify re-use of underlying arrays in slice operations
Please note the slight rewording for append: The spec now
requires that append reuses the underlying array if it is
sufficiently large. Per majority sentiment.

This is technically a language change but the current
implementation always worked this way.

Fixes #5818.
Fixes #5180.

R=rsc, iant, r, ken, minux.ma, dan.kortschak, rogpeppe, go.peter.90
CC=golang-dev
https://golang.org/cl/14419054
2013-10-16 16:16:54 -07:00
Shenghou Ma
244014e402 doc/effective_go.html: fix code example
Fixes #6595.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14425062
2013-10-15 21:30:49 -04:00
Oling Cat
6f53c4136b doc/contrib.html: fix some tags
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/14516057
2013-10-15 18:41:23 +11:00
Shenghou Ma
26f43a089e doc: fix small HTML problems
R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/14629043
2013-10-12 18:40:41 -04:00
Rob Pike
7f168f9ccf doc/effective_go.html: fix unescaped less-than character
Why doesn't tidy complain about these?
Found by manlio.perillo.
Fixes #6571

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/14608044
2013-10-11 16:39:40 -07:00
Ian Lance Taylor
db3374e24d doc/progs: don't try building cgo tests if CGO_ENABLED=0
R=golang-dev, jsing, r
CC=golang-dev
https://golang.org/cl/14523056
2013-10-11 08:55:13 -07:00
Rob Pike
beca0e124d doc/effective_go.html: fix a couple of cosmetic issues
At the moment, godoc expands the example in the link, but in
the past it has not. Add a waffle word to allow either possibility.
Also change the order of cases in the switch in Compare to
be consistent with the other switch in the function.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/14439055
2013-10-10 17:26:03 -07:00
Andrew Gerrand
cf694aac34 doc: fix a few broken links
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/14494044
2013-10-09 07:05:43 +11:00
Andrew Gerrand
0d676f3d1e doc/articles/wiki: fix path handling and clean up test process
Fixes #6525.

R=r
CC=golang-dev
https://golang.org/cl/14383043
2013-10-08 11:14:35 +11:00