lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit e2070325 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

doc: go1.8.html review feedback

TBR=See https://golang.org/cl/33244

Updates #17929

Change-Id: Ic6d449e7822daa70f3fe17e942e9d29233547019
Reviewed-on: https://go-review.googlesource.com/33759Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent b43384e8
...@@ -44,10 +44,25 @@ and <a href="#sort_slice">simplifies sorting slices</a>. ...@@ -44,10 +44,25 @@ and <a href="#sort_slice">simplifies sorting slices</a>.
<h2 id="language">Changes to the language</h2> <h2 id="language">Changes to the language</h2>
<p> <p>
When explicitly converting structs, tags are now ignored for structural type identity. When explicitly converting a value from one struct type to another, as of Go 1. 8 the tags are ignored.
See the <a href="/ref/spec#Conversions">language specification</a> for details. Thus two structs that differ only in their tags may be converted from one to the other:
</p> </p>
<pre>
func example() {
type T1 struct {
X int `json:"foo"`
}
type T2 struct {
X int `json:"bar"`
}
var v1 T1
var v2 T2
v1 = T1(v2) // now legal
}
</pre>
<p> <!-- CL 17711 --> <p> <!-- CL 17711 -->
The language specification now only requires that implementations The language specification now only requires that implementations
support up to 16-bit exponents in floating-point constants. This does not affect support up to 16-bit exponents in floating-point constants. This does not affect
...@@ -65,7 +80,7 @@ Go now supports 32-bit MIPS on Linux for both big-endian ...@@ -65,7 +80,7 @@ Go now supports 32-bit MIPS on Linux for both big-endian
</p> </p>
<p> <p>
Go now requires DragonFly BSD 4.4.4 or later. <!-- CL 29491, CL 29971 --> On DragonFly BSD, Go now requires DragonFly 4.4.4 or later. <!-- CL 29491, CL 29971 -->
</p> </p>
<p> <p>
...@@ -195,11 +210,11 @@ added: ...@@ -195,11 +210,11 @@ added:
<h3 id="tool_yacc">Yacc</h3> <h3 id="tool_yacc">Yacc</h3>
<p> <!-- CL 27324, CL 27325 --> <p> <!-- CL 27324, CL 27325 -->
The <code>yacc</code> tool (previously available via The <code>yacc</code> tool (previously available by running
<code>go</code> <code>tool</code> <code>yacc</code>”) <code>go</code> <code>tool</code> <code>yacc</code>”)
has been removed. As of Go 1.7 it was no longer used by the Go compiler. has been removed. As of Go 1.7 it was no longer used by the Go compiler.
It has moved to the “tools” repository and is and is available via It has moved to the “tools” repository and is now available at
<code>go</code> <code>get</code> <code><a href="https://godoc.org/golang.org/x/tools/cmd/goyacc">golang.org/x/tools/cmd/goyacc</a></code>. <code><a href="https://godoc.org/golang.org/x/tools/cmd/goyacc">golang.org/x/tools/cmd/goyacc</a></code>.
</p> </p>
<h3 id="tool_fix">Fix</h3> <h3 id="tool_fix">Fix</h3>
...@@ -243,8 +258,8 @@ cmd/trace: annotate different mark worker types (CL 30702) ...@@ -243,8 +258,8 @@ cmd/trace: annotate different mark worker types (CL 30702)
<h3 id="tool_vet">Vet</h3> <h3 id="tool_vet">Vet</h3>
<p>Vet is stricter in some ways and looser others which <p>Vet is stricter in some ways and looser where it
caused false positives.</p> previously caused false positives.</p>
<p>Vet now checks copying of array of locks, <p>Vet now checks copying of array of locks,
duplicate JSON and XML struct field tags, duplicate JSON and XML struct field tags,
...@@ -265,7 +280,7 @@ all architectures. ...@@ -265,7 +280,7 @@ all architectures.
<p> <p>
The new back end, based on The new back end, based on
<a href="https://en.wikipedia.org/wiki/Static_single_assignment_form">SSA</a>, <a href="https://en.wikipedia.org/wiki/Static_single_assignment_form">static single assignment form</a> (SSA),
generates more compact, more efficient code generates more compact, more efficient code
and provides a better platform for optimizations and provides a better platform for optimizations
such as bounds check elimination. such as bounds check elimination.
...@@ -605,7 +620,7 @@ Optimizations and bug fixes are not listed. ...@@ -605,7 +620,7 @@ Optimizations and bug fixes are not listed.
the NTFS, UNIX, and Extended Time Stamp metadata fields. the NTFS, UNIX, and Extended Time Stamp metadata fields.
<!-- CL 30811 --> <!-- CL 30811 -->
When writing zip files, the Extended Time Stamp field is written When writing zip files, the Extended Time Stamp field is written
if TODO: validate implementation. for files with non-zero modification times.
</p> </p>
</dd> </dd>
...@@ -808,7 +823,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -808,7 +823,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<a href="/pkg/database/sql#DB.BeginContext"><code>DB.BeginContext</code></a>. <a href="/pkg/database/sql#DB.BeginContext"><code>DB.BeginContext</code></a>.
An error will be returned if an isolation level is selected that the driver An error will be returned if an isolation level is selected that the driver
does not support. A read-only attribute may also be set on the transaction does not support. A read-only attribute may also be set on the transaction
with <a href="/pkg/database/sql/#ReadOnlyContext"><code>ReadOnlyContext</code></a> with <a href="/pkg/database/sql/#ReadOnlyContext"><code>ReadOnlyContext</code></a>.
</p> </p>
<p> <p>
Queries now expose the SQL column type information for drivers that support it. Queries now expose the SQL column type information for drivers that support it.
...@@ -821,7 +836,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -821,7 +836,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<a href="/pkg/database/sql/#Rows.Next"><code>Rows.Next</code></a> returns false, <a href="/pkg/database/sql/#Rows.Next"><code>Rows.Next</code></a> returns false,
<a href="/pkg/database/sql/#Rows.NextResultSet"><code>Rows.NextResultSet</code></a> <a href="/pkg/database/sql/#Rows.NextResultSet"><code>Rows.NextResultSet</code></a>
may be called to advance to the next result set. The existing <code>Rows</code> may be called to advance to the next result set. The existing <code>Rows</code>
should be continued to be used after it advances to the next result set. should continue to be used after it advances to the next result set.
</p> </p>
<p> <p>
<a href="/pkg/database/sql/#NamedParam"><code>NamedParam</code></a> may be used <a href="/pkg/database/sql/#NamedParam"><code>NamedParam</code></a> may be used
...@@ -841,7 +856,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -841,7 +856,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<p> <p>
The new <code>Context</code> query methods work for all drivers, but The new <code>Context</code> query methods work for all drivers, but
<code>Context</code> cancelation is not responsive unless the driver has been <code>Context</code> cancelation is not responsive unless the driver has been
updated to used them. The other features require driver support in updated to use them. The other features require driver support in
<a href="/pkg/database/sql/driver"><code>database/sql/driver</code></a>. <a href="/pkg/database/sql/driver"><code>database/sql/driver</code></a>.
Driver authors should review the new interfaces. Users of existing Driver authors should review the new interfaces. Users of existing
driver should review the driver documentation to see what driver should review the driver documentation to see what
...@@ -883,9 +898,10 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -883,9 +898,10 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<dl id="encoding_binary"><dt><a href="/pkg/encoding/binary/">encoding/binary</a></dt> <dl id="encoding_binary"><dt><a href="/pkg/encoding/binary/">encoding/binary</a></dt>
<dd> <dd>
<p> <!-- CL 28514 --> <p> <!-- CL 28514 -->
The package now supports boolean values. <a href="/pkg/encoding/binary/#Read"><code>Read</code></a>
TODO: add docs in encoding/binary package, then link to package docs and
here. <a href="/pkg/encoding/binary/#Write"><code>Write</code></a>
now support booleans.
</p> </p>
</dd> </dd>
</dl> </dl>
...@@ -1460,8 +1476,8 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1460,8 +1476,8 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
"<code>\\?\c:\*</code>", "<code>\\?\c:\*</code>",
<a href="/pkg/path/filepath/#EvalSymlinks"><code>EvalSymlinks</code></a> now <a href="/pkg/path/filepath/#EvalSymlinks"><code>EvalSymlinks</code></a> now
correctly handles "<code>C:.</code>", and correctly handles "<code>C:.</code>", and
<a href="/pkg/path/filepath/#Clean"><code>Clean</code></a> now properlys handles a leading "<code>..</code>" <a href="/pkg/path/filepath/#Clean"><code>Clean</code></a> now properly
in the path. handles a leading "<code>..</code>" in the path.
<p> <p>
</dd> </dd>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment