@@ -44,10 +44,25 @@ <h2 id="introduction">DRAFT RELEASE NOTES - Introduction to Go 1.8</h2>
44
44
< h2 id ="language "> Changes to the language</ h2 >
45
45
46
46
< 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:
49
49
</ p >
50
50
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
+
51
66
< p > <!-- CL 17711 -->
52
67
The language specification now only requires that implementations
53
68
support up to 16-bit exponents in floating-point constants. This does not affect
@@ -65,7 +80,7 @@ <h2 id="ports">Ports</h2>
65
80
</ p >
66
81
67
82
< 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 -->
69
84
</ p >
70
85
71
86
< p >
@@ -195,11 +210,11 @@ <h3 id="cmd_asm">Assembler</h3>
195
210
< h3 id ="tool_yacc "> Yacc</ h3 >
196
211
197
212
< p > <!-- CL 27324, CL 27325 -->
198
- The < code > yacc</ code > tool (previously available via
213
+ The < code > yacc</ code > tool (previously available by running
199
214
“< code > go</ code > < code > tool</ code > < code > yacc</ code > ”)
200
215
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 > .
203
218
</ p >
204
219
205
220
< h3 id ="tool_fix "> Fix</ h3 >
@@ -243,8 +258,8 @@ <h3 id="tool_trace">Trace</h3>
243
258
244
259
< h3 id ="tool_vet "> Vet</ h3 >
245
260
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 >
248
263
249
264
< p > Vet now checks copying of array of locks,
250
265
duplicate JSON and XML struct field tags,
@@ -265,7 +280,7 @@ <h3 id="compiler">Compiler Toolchain</h3>
265
280
266
281
< p >
267
282
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) ,
269
284
generates more compact, more efficient code
270
285
and provides a better platform for optimizations
271
286
such as bounds check elimination.
@@ -605,7 +620,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
605
620
the NTFS, UNIX, and Extended Time Stamp metadata fields.
606
621
<!-- CL 30811 -->
607
622
When writing zip files, the Extended Time Stamp field is written
608
- if TODO: validate implementation .
623
+ for files with non-zero modification times .
609
624
</ p >
610
625
611
626
</ dd >
@@ -808,7 +823,7 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
808
823
< a href ="/pkg/database/sql#DB.BeginContext "> < code > DB.BeginContext</ code > </ a > .
809
824
An error will be returned if an isolation level is selected that the driver
810
825
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 > .
812
827
</ p >
813
828
< p >
814
829
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>
821
836
< a href ="/pkg/database/sql/#Rows.Next "> < code > Rows.Next</ code > </ a > returns false,
822
837
< a href ="/pkg/database/sql/#Rows.NextResultSet "> < code > Rows.NextResultSet</ code > </ a >
823
838
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.
825
840
</ p >
826
841
< p >
827
842
< 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>
841
856
< p >
842
857
The new < code > Context</ code > query methods work for all drivers, but
843
858
< 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
845
860
< a href ="/pkg/database/sql/driver "> < code > database/sql/driver</ code > </ a > .
846
861
Driver authors should review the new interfaces. Users of existing
847
862
driver should review the driver documentation to see what
@@ -883,9 +898,10 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
883
898
< dl id ="encoding_binary "> < dt > < a href ="/pkg/encoding/binary/ "> encoding/binary</ a > </ dt >
884
899
< dd >
885
900
< 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.
889
905
</ p >
890
906
</ dd >
891
907
</ dl >
@@ -1460,8 +1476,8 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
1460
1476
"< code > \\?\c:\*</ code > ",
1461
1477
< a href ="/pkg/path/filepath/#EvalSymlinks "> < code > EvalSymlinks</ code > </ a > now
1462
1478
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.
1465
1481
< p >
1466
1482
1467
1483
</ dd >
0 commit comments