From 917c5fb8ec48e22459d77e3849e6d388f93d3260 Mon Sep 17 00:00:00 2001
From: Ondřej Surý
+go1.0.2 (released 2012/06/13) was issued to fix two bugs in the implementation +of maps using struct or array keys: +issue 3695 and +issue 3573. +It also includes many minor code and documentation fixes. +
+See the go1 release branch history for the complete list of changes.
diff --git a/doc/go_spec.html b/doc/go_spec.html index 8cb257a59..90acc1704 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -684,6 +684,8 @@ consists of all methods with receiver typeT
.
The method set of the corresponding pointer type *T
is the set of all methods with receiver *T
or T
(that is, it also contains the method set of T
).
+Further rules apply to structs containing anonymous fields, as described
+in the section on struct types.
Any other type has an empty method set.
In a method set, each method must have a
unique method name.
@@ -955,28 +957,39 @@ struct {
-Fields and methods (§Method declarations) of an anonymous field are
-promoted to be ordinary fields and methods of the struct (§Selectors).
-The following rules apply for a struct type S
and
-a type named T
:
+A field or method f
of an
+anonymous field in a struct x
is called promoted if
+x.f
is a legal selector that denotes
+that field or method f
.
S
contains an anonymous field T
, the
- method set of S
includes the
- method set of T
.
- S
contains an anonymous field *T
, the
- method set of S
includes the method set of *T
- (which itself includes the method set of T
).
- +Promoted fields act like ordinary fields +of a struct except that they cannot be used as field names in +composite literals of the struct. +
-S
contains an anonymous field T
or
- *T
, the method set of *S
includes the
- method set of *T
(which itself includes the method
- set of T
).
+
+Given a struct type S
and a type named T
,
+promoted methods are included in the method set of the struct as follows:
+
S
contains an anonymous field T
,
+ the method sets of S
+ and *S
both include promoted methods with receiver
+ T
. The method set of *S
also
+ includes promoted methods with receiver *T
.
+ S
contains an anonymous field *T
,
+ the method sets of S
and *S
both
+ include promoted methods with receiver T
or
+ *T
.
A field declaration may be followed by an optional string literal tag, which becomes an attribute for all the fields in the corresponding @@ -3866,7 +3879,11 @@ x, _ = f() // ignore second value returned by f() In the second form, the number of operands on the left must equal the number of expressions on the right, each of which must be single-valued, and the nth expression on the right is assigned to the nth -operand on the left. The assignment proceeds in two phases. +operand on the left. +
+ ++The assignment proceeds in two phases. First, the operands of index expressions and pointer indirections (including implicit pointer indirections in selectors) @@ -3885,13 +3902,20 @@ i, x[i] = 1, 2 // set i = 1, x[0] = 2 i = 0 x[i], i = 2, 1 // set x[0] = 2, i = 1 -x[0], x[0] = 1, 2 // set x[0] = 1, then x[0] = 2 (so x[0] = 2 at end) +x[0], x[0] = 1, 2 // set x[0] = 1, then x[0] = 2 (so x[0] == 2 at end) x[1], x[3] = 4, 5 // set x[1] = 4, then panic setting x[3] = 5. type Point struct { x, y int } var p *Point x[2], p.x = 6, 7 // set x[2] = 6, then panic setting p.x = 7 + +i = 2 +x = []int{3, 5, 7} +for i, x[i] = range x { // set i, x[2] = 0, x[0] + break +} +// after this loop, i == 0 and x == []int{3, 5, 3}
diff --git a/doc/install-source.html b/doc/install-source.html index 080bceb4d..87c187ba8 100644 --- a/doc/install-source.html +++ b/doc/install-source.html @@ -170,7 +170,6 @@ ALL TESTS PASSED Installed Go for linux/amd64 in /home/you/go. Installed commands in /home/you/go/bin. *** You need to add /home/you/go/bin to your $PATH. *** -The compiler is 6g.
diff --git a/doc/install.html b/doc/install.html
index ad3eaf338..b856836ff 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -24,6 +24,32 @@ For information about installing gccgo
, see
Setting up and using gccgo.
+The gc
compiler supports the following operating systems and
+architectures. Please ensure your system meets these requirements before
+proceeding. If your OS or architecture is not on the list, it's possible that
+gccgo
might support your setup; see
+Setting up and using gccgo for details.
+
Operating system | +Architectures | +Notes | +
---|---|---|
FreeBSD 7 or later | amd64, 386 | Debian GNU/kFreeBSD not supported |
Linux 2.6.23 or later with glibc | amd64, 386, arm | CentOS/RHEL 5.x not supported; no binary distribution for ARM yet |
Mac OS X 10.6/10.7 | amd64, 386 | use the gcc† that comes with Xcode |
Windows 2000 or later | amd64, 386 | use mingw gcc†; cygwin or msys is not needed |
+†gcc
is required only if you plan to use cgo.
+
diff --git a/doc/style.css b/doc/style.css index 7f3384c6c..a0c632098 100644 --- a/doc/style.css +++ b/doc/style.css @@ -373,6 +373,7 @@ div#blog .read { .toggleVisible .expanded { display: block; } table.codetable { margin-left: auto; margin-right: auto; border-style: none; } +table.codetable td { padding-right: 10px; } hr { border-style: none; border-top: 1px solid black; } img.gopher { diff --git a/doc/talks/go_talk-20091030.pdf b/doc/talks/go_talk-20091030.pdf new file mode 100644 index 000000000..5139ff2bd Binary files /dev/null and b/doc/talks/go_talk-20091030.pdf differ -- cgit v1.2.3