Skip to content

Commit e207032

Browse files
committed
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/33759 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent b43384e commit e207032

File tree

1 file changed

+34
-18
lines changed

1 file changed

+34
-18
lines changed

doc/go1.8.html

+34-18
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,25 @@ <h2 id="introduction">DRAFT RELEASE NOTES - Introduction to Go 1.8</h2>
4444
<h2 id="language">Changes to the language</h2>
4545

4646
<p>
47-
When explicitly converting structs, tags are now ignored for structural type identity.
48-
See the <a href="/ref/spec#Conversions">language specification</a> for details.
47+
When explicitly converting a value from one struct type to another, as of Go 1. 8 the tags are ignored.
48+
Thus two structs that differ only in their tags may be converted from one to the other:
4949
</p>
5050

51+
<pre>
52+
func example() {
53+
type T1 struct {
54+
X int `json:"foo"`
55+
}
56+
type T2 struct {
57+
X int `json:"bar"`
58+
}
59+
var v1 T1
60+
var v2 T2
61+
v1 = T1(v2) // now legal
62+
}
63+
</pre>
64+
65+
5166
<p> <!-- CL 17711 -->
5267
The language specification now only requires that implementations
5368
support up to 16-bit exponents in floating-point constants. This does not affect
@@ -65,7 +80,7 @@ <h2 id="ports">Ports</h2>
6580
</p>
6681

6782
<p>
68-
Go now requires DragonFly BSD 4.4.4 or later. <!-- CL 29491, CL 29971 -->
83+
On DragonFly BSD, Go now requires DragonFly 4.4.4 or later. <!-- CL 29491, CL 29971 -->
6984
</p>
7085

7186
<p>
@@ -195,11 +210,11 @@ <h3 id="cmd_asm">Assembler</h3>
195210
<h3 id="tool_yacc">Yacc</h3>
196211

197212
<p> <!-- CL 27324, CL 27325 -->
198-
The <code>yacc</code> tool (previously available via
213+
The <code>yacc</code> tool (previously available by running
199214
<code>go</code> <code>tool</code> <code>yacc</code>”)
200215
has been removed. As of Go 1.7 it was no longer used by the Go compiler.
201-
It has moved to the “tools” repository and is and is available via
202-
<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>.
216+
It has moved to the “tools” repository and is now available at
217+
<code><a href="https://godoc.org/golang.org/x/tools/cmd/goyacc">golang.org/x/tools/cmd/goyacc</a></code>.
203218
</p>
204219

205220
<h3 id="tool_fix">Fix</h3>
@@ -243,8 +258,8 @@ <h3 id="tool_trace">Trace</h3>
243258

244259
<h3 id="tool_vet">Vet</h3>
245260

246-
<p>Vet is stricter in some ways and looser others which
247-
caused false positives.</p>
261+
<p>Vet is stricter in some ways and looser where it
262+
previously caused false positives.</p>
248263

249264
<p>Vet now checks copying of array of locks,
250265
duplicate JSON and XML struct field tags,
@@ -265,7 +280,7 @@ <h3 id="compiler">Compiler Toolchain</h3>
265280

266281
<p>
267282
The new back end, based on
268-
<a href="https://en.wikipedia.org/wiki/Static_single_assignment_form">SSA</a>,
283+
<a href="https://en.wikipedia.org/wiki/Static_single_assignment_form">static single assignment form</a> (SSA),
269284
generates more compact, more efficient code
270285
and provides a better platform for optimizations
271286
such as bounds check elimination.
@@ -605,7 +620,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
605620
the NTFS, UNIX, and Extended Time Stamp metadata fields.
606621
<!-- CL 30811 -->
607622
When writing zip files, the Extended Time Stamp field is written
608-
if TODO: validate implementation.
623+
for files with non-zero modification times.
609624
</p>
610625

611626
</dd>
@@ -808,7 +823,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
808823
<a href="/pkg/database/sql#DB.BeginContext"><code>DB.BeginContext</code></a>.
809824
An error will be returned if an isolation level is selected that the driver
810825
does not support. A read-only attribute may also be set on the transaction
811-
with <a href="/pkg/database/sql/#ReadOnlyContext"><code>ReadOnlyContext</code></a>
826+
with <a href="/pkg/database/sql/#ReadOnlyContext"><code>ReadOnlyContext</code></a>.
812827
</p>
813828
<p>
814829
Queries now expose the SQL column type information for drivers that support it.
@@ -821,7 +836,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
821836
<a href="/pkg/database/sql/#Rows.Next"><code>Rows.Next</code></a> returns false,
822837
<a href="/pkg/database/sql/#Rows.NextResultSet"><code>Rows.NextResultSet</code></a>
823838
may be called to advance to the next result set. The existing <code>Rows</code>
824-
should be continued to be used after it advances to the next result set.
839+
should continue to be used after it advances to the next result set.
825840
</p>
826841
<p>
827842
<a href="/pkg/database/sql/#NamedParam"><code>NamedParam</code></a> may be used
@@ -841,7 +856,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
841856
<p>
842857
The new <code>Context</code> query methods work for all drivers, but
843858
<code>Context</code> cancelation is not responsive unless the driver has been
844-
updated to used them. The other features require driver support in
859+
updated to use them. The other features require driver support in
845860
<a href="/pkg/database/sql/driver"><code>database/sql/driver</code></a>.
846861
Driver authors should review the new interfaces. Users of existing
847862
driver should review the driver documentation to see what
@@ -883,9 +898,10 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
883898
<dl id="encoding_binary"><dt><a href="/pkg/encoding/binary/">encoding/binary</a></dt>
884899
<dd>
885900
<p> <!-- CL 28514 -->
886-
The package now supports boolean values.
887-
TODO: add docs in encoding/binary package, then link to package docs
888-
here.
901+
<a href="/pkg/encoding/binary/#Read"><code>Read</code></a>
902+
and
903+
<a href="/pkg/encoding/binary/#Write"><code>Write</code></a>
904+
now support booleans.
889905
</p>
890906
</dd>
891907
</dl>
@@ -1460,8 +1476,8 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
14601476
"<code>\\?\c:\*</code>",
14611477
<a href="/pkg/path/filepath/#EvalSymlinks"><code>EvalSymlinks</code></a> now
14621478
correctly handles "<code>C:.</code>", and
1463-
<a href="/pkg/path/filepath/#Clean"><code>Clean</code></a> now properlys handles a leading "<code>..</code>"
1464-
in the path.
1479+
<a href="/pkg/path/filepath/#Clean"><code>Clean</code></a> now properly
1480+
handles a leading "<code>..</code>" in the path.
14651481
<p>
14661482

14671483
</dd>

0 commit comments

Comments
 (0)