Commit c586630d authored by Joe Tsai's avatar Joe Tsai Committed by Joe Tsai

doc: update go1.8.html

Made many minor changes so that the document is consistent with itself.

Some more noticeable changes:
* CL/34141: Revert "testing: add T.Context method"
* CL/33630: net/http: document restrictions on ETag as expected by ServeContent

Change-Id: I39ae5e55c56e374895c115e6852998c940beae35
Reviewed-on: https://go-review.googlesource.com/34243Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent c6228ef7
...@@ -101,8 +101,9 @@ and cancelation. ...@@ -101,8 +101,9 @@ and cancelation.
<p> <p>
Go 1.8 will be the last release to support Linux on ARMv5E and ARMv6 processors: Go 1.8 will be the last release to support Linux on ARMv5E and ARMv6 processors:
Go 1.9 will likely require the ARMv6K (as found in the Raspberry Pi 1) or later. Go 1.9 will likely require the ARMv6K (as found in the Raspberry Pi 1) or later.
To identify whether a Linux system is ARMv6K or later, run <code>go tool dist -check-armv6k</code> To identify whether a Linux system is ARMv6K or later, run
(to facilitate testing, it is also possible to just copy the dist command to the <code>go</code> <code>tool</code> <code>dist</code> <code>-check-armv6k</code>
(to facilitate testing, it is also possible to just copy the <code>dist</code> command to the
system without installing a full copy of Go 1.8) system without installing a full copy of Go 1.8)
and if the program terminates with output "ARMv6K supported." then the system and if the program terminates with output "ARMv6K supported." then the system
implements ARMv6K or later. implements ARMv6K or later.
...@@ -133,8 +134,9 @@ For 64-bit x86 systems, the following instructions have been added: ...@@ -133,8 +134,9 @@ For 64-bit x86 systems, the following instructions have been added:
<code>MOVSHDUP</code>, <code>MOVSHDUP</code>,
<code>MOVSLDUP</code>, <code>MOVSLDUP</code>,
<code>VMOVDDUP</code>, <code>VMOVDDUP</code>,
<code>VMOVSHDUP</code>, <code>VMOVSHDUP</code>, and
and <code>VMOVSLDUP</code>.</p> <code>VMOVSLDUP</code>.
</p>
<p> <p>
For 64-bit PPC systems, the common vector scalar instructions have been For 64-bit PPC systems, the common vector scalar instructions have been
...@@ -216,7 +218,7 @@ added: ...@@ -216,7 +218,7 @@ added:
<code>XXSEL</code>, <code>XXSEL</code>,
<code>XXSI</code>, <code>XXSI</code>,
<code>XXSLDWI</code>, <code>XXSLDWI</code>,
<code>XXSPLT</code>, and <code>XXSPLT</code>, and
<code>XXSPLTW</code>. <code>XXSPLTW</code>.
</p> </p>
...@@ -224,8 +226,8 @@ added: ...@@ -224,8 +226,8 @@ added:
<p> <!-- CL 27324, CL 27325 --> <p> <!-- CL 27324, CL 27325 -->
The <code>yacc</code> tool (previously available by running 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.
has been removed. As of Go 1.7 it was no longer used by the Go compiler. As of Go 1.7 it was no longer used by the Go compiler.
It has moved to the “tools” repository and is now available at It has moved to the “tools” repository and is now available at
<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>
...@@ -242,7 +244,7 @@ It has moved to the “tools” repository and is now available at ...@@ -242,7 +244,7 @@ It has moved to the “tools” repository and is now available at
<p> <!-- CL 33157 --> <p> <!-- CL 33157 -->
The <code>pprof</code> tool can now profile TLS servers The <code>pprof</code> tool can now profile TLS servers
and skip certificate validation by using the "<code>https+insecure</code>" and skip certificate validation by using the <code>https+insecure</code>
URL scheme. URL scheme.
</p> </p>
...@@ -269,13 +271,13 @@ It has moved to the “tools” repository and is now available at ...@@ -269,13 +271,13 @@ It has moved to the “tools” repository and is now available at
<p>Vet is stricter in some ways and looser where it <p>Vet is stricter in some ways and looser where it
previously caused false positives.</p> previously caused false positives.</p>
<p>Vet now checks copying an array of locks, <p>Vet now checks for copying an array of locks,
duplicate JSON and XML struct field tags, duplicate JSON and XML struct field tags,
non-space-separated struct tags, non-space-separated struct tags,
deferred calls to HTTP <code>Response.Body.Close</code> deferred calls to HTTP <code>Response.Body.Close</code>
before checking errors, before checking errors, and
indexed arguments in <code>Printf</code>, indexed arguments in <code>Printf</code>.
and improves existing checks.</p> It also improves existing checks.</p>
</p> </p>
<h3 id="compiler">Compiler Toolchain</h3> <h3 id="compiler">Compiler Toolchain</h3>
...@@ -323,7 +325,7 @@ see improvements closer to the 32-bit ARM numbers. ...@@ -323,7 +325,7 @@ see improvements closer to the 32-bit ARM numbers.
<p> <!-- CL 29991 --> <p> <!-- CL 29991 -->
The environment variable <code>PKG_CONFIG</code> may now be used to The environment variable <code>PKG_CONFIG</code> may now be used to
set the program to run to handle <code>#cgo pkg-config</code> set the program to run to handle <code>#cgo</code> <code>pkg-config</code>
directives. The default is <code>pkg-config</code>, the program directives. The default is <code>pkg-config</code>, the program
always used by earlier releases. This is intended to make it easier always used by earlier releases. This is intended to make it easier
to cross-compile to cross-compile
...@@ -377,8 +379,8 @@ version of gccgo. ...@@ -377,8 +379,8 @@ version of gccgo.
<p> <p>
The new The new
<a href="/cmd/go/#hdr-Print_information_for_bug_reports"><code>go</code> <a href="/cmd/go/#hdr-Print_information_for_bug_reports"><code>go</code> <code>bug</code></a>
<code>bug</code></a>command starts a bug report on GitHub, prefilled command starts a bug report on GitHub, prefilled
with information about the current system. with information about the current system.
</p> </p>
...@@ -386,9 +388,8 @@ version of gccgo. ...@@ -386,9 +388,8 @@ version of gccgo.
<p> <!-- CL 25419 --> <p> <!-- CL 25419 -->
The The
<a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol"><code>go</code> <a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol"><code>go</code> <code>doc</code></a>
<code>doc</code></a>” command command now groups constants and variables with their type,
now groups constants and variables with their type,
following the behavior of following the behavior of
<a href="/cmd/godoc/"><code>godoc</code></a>. <a href="/cmd/godoc/"><code>godoc</code></a>.
</p> </p>
...@@ -460,7 +461,7 @@ and give more detail. ...@@ -460,7 +461,7 @@ and give more detail.
<h3 id="memstats">MemStats Documentation</h3> <h3 id="memstats">MemStats Documentation</h3>
<p> <!-- CL 28972 --> <p> <!-- CL 28972 -->
The runtime's <a href="/pkg/runtime/#MemStats"><code>MemStats</code></a> The <a href="/pkg/runtime/#MemStats"><code>runtime.MemStats</code></a>
type has been more thoroughly documented. type has been more thoroughly documented.
</p> </p>
...@@ -498,7 +499,7 @@ There have been optimizations to implementations in the ...@@ -498,7 +499,7 @@ There have been optimizations to implementations in the
<a href="/pkg/strings/"><code>strings</code></a>, <a href="/pkg/strings/"><code>strings</code></a>,
<a href="/pkg/syscall/"><code>syscall</code></a>, <a href="/pkg/syscall/"><code>syscall</code></a>,
<a href="/pkg/text/template/"><code>text/template</code></a>, and <a href="/pkg/text/template/"><code>text/template</code></a>, and
<a href="/pkg/unicode/utf8/"><code>unicode/utf8</code></a>, <a href="/pkg/unicode/utf8/"><code>unicode/utf8</code></a>
packages. packages.
</p> </p>
...@@ -590,9 +591,6 @@ now implements the new ...@@ -590,9 +591,6 @@ now implements the new
takes a context argument.</li> takes a context argument.</li>
<li>There have been <a href="#database_sql">significant additions</a> to the <li>There have been <a href="#database_sql">significant additions</a> to the
<a href="/pkg/database/sql/">database/sql</a> package with context support.</li> <a href="/pkg/database/sql/">database/sql</a> package with context support.</li>
<li>The new <a href="/pkg/testing/#T.Context"><code>T.Context</code></a>
method in the <a href="/pkg/testing/">testing</a> package now returns a context for
the active test or benchmark.</li>
<li>All nine of the new <code>Lookup</code> methods on the new <li>All nine of the new <code>Lookup</code> methods on the new
<a href="/pkg/net/#Resolver"><code>net.Resolver</code></a> now <a href="/pkg/net/#Resolver"><code>net.Resolver</code></a> now
take a context.</li> take a context.</li>
...@@ -606,7 +604,7 @@ now implements the new ...@@ -606,7 +604,7 @@ now implements the new
<p> <p>
Most users will want to use the new <code>-mutexprofile</code> Most users will want to use the new <code>-mutexprofile</code>
flag with <a href="/cmd/go/#hdr-Description_of_testing_flags"><code>go</code> <code>test</code></a>, flag with <a href="/cmd/go/#hdr-Description_of_testing_flags"><code>go</code> <code>test</code></a>,
and then use <a href="/cmd/pprof/">pprof</a> on the resultant file. and then use <a href="/cmd/pprof/">pprof</a> on the resultant file.
</p> </p>
...@@ -622,8 +620,8 @@ now implements the new ...@@ -622,8 +620,8 @@ now implements the new
<p> <p>
As always, there are various minor changes and updates to the library, As always, there are various minor changes and updates to the library,
made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a> made with the Go 1 <a href="/doc/go1compat">promise of compatibility</a>
in mind. The follow sections list the user visible changes and additions. in mind. The following sections list the user visible changes and additions.
Optimizations and bug fixes are not listed. Optimizations and minor bug fixes are not listed.
</p> </p>
<dl id="archive_tar"><dt><a href="/pkg/archive/tar/">archive/tar</a></dt> <dl id="archive_tar"><dt><a href="/pkg/archive/tar/">archive/tar</a></dt>
...@@ -664,11 +662,11 @@ Optimizations and bug fixes are not listed. ...@@ -664,11 +662,11 @@ Optimizations and bug fixes are not listed.
There have been some minor fixes to the encoder to improve the There have been some minor fixes to the encoder to improve the
compression ratio in certain situations. As a result, the exact compression ratio in certain situations. As a result, the exact
encoded output of <code>DEFLATE</code> may be different from Go 1.7. Since encoded output of <code>DEFLATE</code> may be different from Go 1.7. Since
DEFLATE is the underlying compression of gzip, png, zlib, and zip, <code>DEFLATE</code> is the underlying compression of gzip, png, zlib, and zip,
those formats may have changed outputs. those formats may have changed outputs.
</p> </p>
<p> <p> <!-- CL 31174 -->
The encoder, when operating in The encoder, when operating in
<a href="/pkg/compress/flate/#NoCompression"><code>NoCompression</code></a> <a href="/pkg/compress/flate/#NoCompression"><code>NoCompression</code></a>
mode, now produces a consistent output that is not dependent on mode, now produces a consistent output that is not dependent on
...@@ -789,7 +787,7 @@ Optimizations and bug fixes are not listed. ...@@ -789,7 +787,7 @@ Optimizations and bug fixes are not listed.
AES-128-CBC cipher suites with SHA-256 are also AES-128-CBC cipher suites with SHA-256 are also
now supported. now supported.
</p> </p>
</dd> </dd>
</dl> </dl>
...@@ -830,69 +828,69 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -830,69 +828,69 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
at <code>/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem</code> at <code>/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem</code>
on Linux, to support RHEL and CentOS. on Linux, to support RHEL and CentOS.
</p> </p>
</dd> </dd>
</dl> </dl>
<dl id="database_sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt> <dl id="database_sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt>
<dd> <dd>
<p> <p>
The package now supports <code>context.Context</code>. There are new methods The package now supports <code>context.Context</code>. There are new methods
ending in <code>Context</code> such as ending in <code>Context</code> such as
<a href="/pkg/database/sql/#DB.QueryContext"><code>DB.QueryContext</code></a> and <a href="/pkg/database/sql/#DB.QueryContext"><code>DB.QueryContext</code></a> and
<a href="/pkg/database/sql/#DB.PrepareContext"><code>DB.PrepareContext</code></a> <a href="/pkg/database/sql/#DB.PrepareContext"><code>DB.PrepareContext</code></a>
that take context arguments. Using the new <code>Context</code> methods ensures that that take context arguments. Using the new <code>Context</code> methods ensures that
connections are closed and returned to the connection pool when the connections are closed and returned to the connection pool when the
request is done; enables canceling in-progress queries request is done; enables canceling in-progress queries
should the driver support that; and allows the database should the driver support that; and allows the database
pool to cancel waiting for the next available connection. pool to cancel waiting for the next available connection.
</p> </p>
<p> <p>
The <a href="/pkg/database/sql#IsolationLevel"><code>IsolationLevel</code></a> The <a href="/pkg/database/sql#IsolationLevel"><code>IsolationLevel</code></a>
can now be set when starting a transaction by setting the isolation level can now be set when starting a transaction by setting the isolation level
on the <code>Context</code> then passing that <code>Context</code> to on the <code>Context</code> then passing that <code>Context</code> to
<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.
Rows can return <a href="/pkg/database/sql#Rows.ColumnTypes"><code>ColumnTypes</code></a> Rows can return <a href="/pkg/database/sql#Rows.ColumnTypes"><code>ColumnTypes</code></a>
which can include SQL type information, column type lengths, and the Go type. which can include SQL type information, column type lengths, and the Go type.
</p> </p>
<p>
A <a href="/pkg/database/sql/#Rows"><code>Rows</code></a>
can now represent multiple result sets. After
<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>
may be called to advance to the next result set. The existing <code>Rows</code>
should continue to be used after it advances to the next result set.
</p>
<p>
<a href="/pkg/database/sql/#NamedArg"><code>NamedArg</code></a> may be used
as query arguments. The new function <a href="/pkg/database/sql/#Named"><code>Named</code></a>
helps create a <a href="/pkg/database/sql/#NamedArg"><code>NamedArg</code></a>
more succinctly.
<p>
If a driver supports the new
<a href="/pkg/database/sql/driver/#Pinger"><code>Pinger</code></a>
interface, the <code>DB</code>'s
<a href="/pkg/database/sql/#DB.Ping"><code>DB.Ping</code></a>
and
<a href="/pkg/database/sql/#DB.PingContext"><code>DB.PingContext</code></a>
methods will use that interface to check whether a
database connection is still valid.
</p>
<p> <p>
The new <code>Context</code> query methods work for all drivers, but A <a href="/pkg/database/sql/#Rows"><code>Rows</code></a>
<code>Context</code> cancelation is not responsive unless the driver has been can now represent multiple result sets. After
updated to use them. The other features require driver support in <a href="/pkg/database/sql/#Rows.Next"><code>Rows.Next</code></a> returns false,
<a href="/pkg/database/sql/driver"><code>database/sql/driver</code></a>. <a href="/pkg/database/sql/#Rows.NextResultSet"><code>Rows.NextResultSet</code></a>
Driver authors should review the new interfaces. Users of existing may be called to advance to the next result set. The existing <code>Rows</code>
driver should review the driver documentation to see what should continue to be used after it advances to the next result set.
it supports and any system specific documentation on each feature. </p>
</p> <p>
<a href="/pkg/database/sql/#NamedArg"><code>NamedArg</code></a> may be used
as query arguments. The new function <a href="/pkg/database/sql/#Named"><code>Named</code></a>
helps create a <a href="/pkg/database/sql/#NamedArg"><code>NamedArg</code></a>
more succinctly.
<p>
If a driver supports the new
<a href="/pkg/database/sql/driver/#Pinger"><code>Pinger</code></a>
interface, the
<a href="/pkg/database/sql/#DB.Ping"><code>DB.Ping</code></a>
and
<a href="/pkg/database/sql/#DB.PingContext"><code>DB.PingContext</code></a>
methods will use that interface to check whether a
database connection is still valid.
</p>
<p>
The new <code>Context</code> query methods work for all drivers, but
<code>Context</code> cancelation is not responsive unless the driver has been
updated to use them. The other features require driver support in
<a href="/pkg/database/sql/driver"><code>database/sql/driver</code></a>.
Driver authors should review the new interfaces. Users of existing
driver should review the driver documentation to see what
it supports and any system specific documentation on each feature.
</p>
</dd> </dd>
</dl> </dl>
...@@ -906,11 +904,9 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -906,11 +904,9 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<a href="/pkg/debug/pe/#StringTable"><code>StringTable</code></a>, <a href="/pkg/debug/pe/#StringTable"><code>StringTable</code></a>,
the method the method
<a href="/pkg/debug/pe/#COFFSymbol.FullName"><code>COFFSymbol.FullName</code></a>, <a href="/pkg/debug/pe/#COFFSymbol.FullName"><code>COFFSymbol.FullName</code></a>,
and and the fields
<a href="/pkg/debug/pe/#File"><code>File</code></a> <a href="/pkg/debug/pe/#File.COFFSymbols"><code>File.COFFSymbols</code></a> and
fields <a href="/pkg/debug/pe/#File.StringTable"><code>File.StringTable</code></a>.
<a href="/pkg/debug/pe/#File.COFFSymbols"><code>COFFSymbols</code></a> and
<a href="/pkg/debug/pe/#File.StringTable"><code>StringTable</code></a>.
</p> </p>
</dd> </dd>
</dl> </dl>
...@@ -964,7 +960,6 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -964,7 +960,6 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
</p> </p>
<p> <!-- CL 30944 --> <p> <!-- CL 30944 -->
In previous versions of Go, unmarshaling a JSON <code>null</code> into an In previous versions of Go, unmarshaling a JSON <code>null</code> into an
<a href="/pkg/encoding/json/#Unmarshaler"><code>Unmarshaler</code></a> <a href="/pkg/encoding/json/#Unmarshaler"><code>Unmarshaler</code></a>
was considered a no-op; now the <code>Unmarshaler</code>'s was considered a no-op; now the <code>Unmarshaler</code>'s
...@@ -1096,7 +1091,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1096,7 +1091,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<a href="/pkg/math/big/#Int.ModInverse"><code>Int.ModInverse</code></a> <a href="/pkg/math/big/#Int.ModInverse"><code>Int.ModInverse</code></a>
now supports negative numbers. now supports negative numbers.
</p> </p>
</dd> </dd>
</dl> </dl>
...@@ -1123,9 +1118,9 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1123,9 +1118,9 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<a href="/pkg/mime/#ParseMediaType"><code>ParseMediaType</code></a> <a href="/pkg/mime/#ParseMediaType"><code>ParseMediaType</code></a>
now preserves unnecessary backslash escapes as literals, now preserves unnecessary backslash escapes as literals,
in order to support MSIE. in order to support MSIE.
When MSIE sends a full file path (in "intranet mode"), it does not When MSIE sends a full file path (in “intranet mode”), it does not
escape backslashes: <code>"C:\dev\go\foo.txt"</code>, not escape backslashes: <code>C:\dev\go\foo.txt</code>, not
<code>"C:\\dev\\go\\foo.txt"</code>. <code>C:\\dev\\go\\foo.txt</code>.
If we see an unnecessary backslash escape, we now assume it is from MSIE If we see an unnecessary backslash escape, we now assume it is from MSIE
and intended as a literal backslash. and intended as a literal backslash.
No known MIME generators emit unnecessary backslash escapes No known MIME generators emit unnecessary backslash escapes
...@@ -1157,7 +1152,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1157,7 +1152,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<dl id="net"><dt><a href="/pkg/net/">net</a></dt> <dl id="net"><dt><a href="/pkg/net/">net</a></dt>
<dd> <dd>
<p><!-- CL 30164, CL 33473 --> <p><!-- CL 30164, CL 33473 -->
The <a href="/pkg/net/#Conn"><code>Conn</code></a> documentation The <a href="/pkg/net/#Conn"><code>Conn</code></a> documentation
has been updated to clarify expectations of an interface has been updated to clarify expectations of an interface
...@@ -1178,8 +1173,8 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1178,8 +1173,8 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
</p> </p>
<p><!-- CL 29951 --> <p><!-- CL 29951 -->
The new <a href="/pkg/net/#Buffers"><code>Buffers</code></a> types permits The new <a href="/pkg/net/#Buffers"><code>Buffers</code></a> type permits
more efficiently writing to the network from multiple discontiguous buffers writing to the network more efficiently from multiple discontiguous buffers
in memory. On certain machines, for certain types of connections, in memory. On certain machines, for certain types of connections,
this is optimized into an OS-specific batch write operation (such as <code>writev</code>). this is optimized into an OS-specific batch write operation (such as <code>writev</code>).
</p> </p>
...@@ -1196,8 +1191,8 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1196,8 +1191,8 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
</p> </p>
<p><!-- CL 29233, CL 24901 --> <p><!-- CL 29233, CL 24901 -->
The Go DNS resolver now supports <code>resolv.conf</code>'s "<code>rotate</code>" The Go DNS resolver now supports <code>resolv.conf</code>'s <code>rotate</code>
and "<code>option ndots:0</code>" options. The "<code>ndots</code>" option is and <code>option</code> <code>ndots:0</code>” options. The “<code>ndots</code> option is
now respected in the same way as <code>libresolve</code>. now respected in the same way as <code>libresolve</code>.
</p> </p>
...@@ -1224,7 +1219,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1224,7 +1219,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<a href="/pkg/net/http/#ServeContent"><code>ServeContent</code></a> <a href="/pkg/net/http/#ServeContent"><code>ServeContent</code></a>
now support HTTP <code>If-Match</code> conditional requests, now support HTTP <code>If-Match</code> conditional requests,
in addition to the previous <code>If-None-Match</code> in addition to the previous <code>If-None-Match</code>
support. support for ETags properly formatted according to RFC 7232, section 2.3.
</li> </li>
</ul> </ul>
...@@ -1244,11 +1239,11 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1244,11 +1239,11 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
existing <a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a> existing <a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a>
support. This functionality requires that the underlying support. This functionality requires that the underlying
<a href="/pkg/net/#Conn"><code>net.Conn</code></a> implements <a href="/pkg/net/#Conn"><code>net.Conn</code></a> implements
<a href="#net">recently-clarified interface documentation</a>. <a href="#net">recently clarified interface documentation</a>.
</li> </li>
<li><!-- CL 32479 --> <li><!-- CL 32479 -->
To serve trailers known after the header has been written, To serve trailers produced after the header has already been written,
see the new see the new
<a href="/pkg/net/http/#TrailerPrefix"><code>TrailerPrefix</code></a> <a href="/pkg/net/http/#TrailerPrefix"><code>TrailerPrefix</code></a>
mechanism. mechanism.
...@@ -1275,7 +1270,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1275,7 +1270,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<p>Client &amp; Transport changes:</p> <p>Client &amp; Transport changes:</p>
<ul> <ul>
<li><!-- CL 28930 --> <li><!-- CL 28930, CL 31435 -->
The <a href="/pkg/net/http/#Client"><code>Client</code></a> The <a href="/pkg/net/http/#Client"><code>Client</code></a>
now copies most request headers on redirect. See now copies most request headers on redirect. See
<a href="/pkg/net/http/#Client">the documentation</a> <a href="/pkg/net/http/#Client">the documentation</a>
...@@ -1320,7 +1315,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1320,7 +1315,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<li> <!-- CL 28077 --> <li> <!-- CL 28077 -->
The <a href="/pkg/net/http/#DefaultTransport"><code>DefaultTransport.Dialer</code></a> The <a href="/pkg/net/http/#DefaultTransport"><code>DefaultTransport.Dialer</code></a>
now enables <code>DualStack</code> ("<a href="https://tools.ietf.org/html/rfc6555">Happy Eyeballs</a>") support, now enables <code>DualStack</code> ("<a href="https://tools.ietf.org/html/rfc6555">Happy Eyeballs</a>") support,
to use IPv4 as a backup if it looks like IPv6 might be allowing the use of IPv4 as a backup if it looks like IPv6 might be
failing. failing.
</li> </li>
...@@ -1364,7 +1359,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1364,7 +1359,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<a href="/pkg/net/http/httputil/#ReverseProxy.ModifyResponse"><code>ModifyResponse</code></a>, <a href="/pkg/net/http/httputil/#ReverseProxy.ModifyResponse"><code>ModifyResponse</code></a>,
for modifying the response from the back end before proxying it to the client. for modifying the response from the back end before proxying it to the client.
</p> </p>
</dd> </dd>
</dl> </dl>
...@@ -1374,7 +1369,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1374,7 +1369,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<p> <!-- CL 32176 --> <p> <!-- CL 32176 -->
Empty quoted strings are once again allowed in the name part of Empty quoted strings are once again allowed in the name part of
an address. That is, Go 1.4 and earlier accepted an address. That is, Go 1.4 and earlier accepted
<code>"" &lt;gopher@example.com&gt;</code>, <code>""</code> <code>&lt;gopher@example.com&gt;</code>,
but Go 1.5 introduced a bug that rejected this address. but Go 1.5 introduced a bug that rejected this address.
The address is recognized again. The address is recognized again.
</p> </p>
...@@ -1389,7 +1384,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1389,7 +1384,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
allows parsing dates found in other allows parsing dates found in other
header lines, such as the <code>Resent-Date:</code> header. header lines, such as the <code>Resent-Date:</code> header.
</p> </p>
</dd> </dd>
</dl> </dl>
...@@ -1397,10 +1392,10 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1397,10 +1392,10 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<dd> <dd>
<p> <!-- CL 33143 --> <p> <!-- CL 33143 -->
If an implementation of If an implementation of the
the <a href="/pkg/net/smtp/#Auth"><code>Auth</code></a> <a href="/pkg/net/smtp/#Auth"><code>Auth.Start</code></a>
interface's <code>Start</code> method returns an method returns an empty <code>toServer</code> value,
empty <code>toServer</code> value, the package no longer sends the package no longer sends
trailing whitespace in the SMTP <code>AUTH</code> command, trailing whitespace in the SMTP <code>AUTH</code> command,
which some servers rejected. which some servers rejected.
</p> </p>
...@@ -1411,14 +1406,17 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1411,14 +1406,17 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<dl id="net_url"><dt><a href="/pkg/net/url/">net/url</a></dt> <dl id="net_url"><dt><a href="/pkg/net/url/">net/url</a></dt>
<dd> <dd>
<p> <!-- CL 31322 --> The new functions <p> <!-- CL 31322 -->
The new functions
<a href="/pkg/net/url/#PathEscape"><code>PathEscape</code></a> <a href="/pkg/net/url/#PathEscape"><code>PathEscape</code></a>
and and
<a href="/pkg/net/url/#PathUnescape"><code>PathUnescape</code></a> <a href="/pkg/net/url/#PathUnescape"><code>PathUnescape</code></a>
are similar to the query escaping and unescaping functions but are similar to the query escaping and unescaping functions but
for path elements.</p> for path elements.
</p>
<p> <!-- CL 28933 --> The new methods <p> <!-- CL 28933 -->
The new methods
<a href="/pkg/net/url/#URL.Hostname"><code>URL.Hostname</code></a> <a href="/pkg/net/url/#URL.Hostname"><code>URL.Hostname</code></a>
and and
<a href="/pkg/net/url/#URL.Port"><code>URL.Port</code></a> <a href="/pkg/net/url/#URL.Port"><code>URL.Port</code></a>
...@@ -1426,7 +1424,8 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1426,7 +1424,8 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
correctly handling the case where the port may not be present. correctly handling the case where the port may not be present.
</p> </p>
<p> <!-- CL 28343 --> The existing method <p> <!-- CL 28343 -->
The existing method
<a href="/pkg/net/url/#URL.ResolveReference"><code>URL.ResolveReference</code></a> <a href="/pkg/net/url/#URL.ResolveReference"><code>URL.ResolveReference</code></a>
now properly handles paths with escaped bytes without losing now properly handles paths with escaped bytes without losing
the escaping. the escaping.
...@@ -1445,7 +1444,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1445,7 +1444,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
now rejects URLs like <code>this_that:other/thing</code> instead of now rejects URLs like <code>this_that:other/thing</code> instead of
interpreting them as relative paths (<code>this_that</code> is not a valid scheme). interpreting them as relative paths (<code>this_that</code> is not a valid scheme).
To force interpretation as a relative path, To force interpretation as a relative path,
such URLs should be prefixed with <code>"./"</code>. such URLs should be prefixed with <code>./</code>.
The <code>URL.String</code> method now inserts this prefix as needed. The <code>URL.String</code> method now inserts this prefix as needed.
</p> </p>
...@@ -1454,7 +1453,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1454,7 +1453,7 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<dl id="os"><dt><a href="/pkg/os/">os</a></dt> <dl id="os"><dt><a href="/pkg/os/">os</a></dt>
<dd> <dd>
<p> <p> <!-- CL 16551 -->
The new function The new function
<a href="/pkg/os/#Executable"><code>Executable</code></a> returns <a href="/pkg/os/#Executable"><code>Executable</code></a> returns
the path name of the running executable. the path name of the running executable.
...@@ -1475,12 +1474,12 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1475,12 +1474,12 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
existing empty directory. existing empty directory.
Previously it would fail when renaming to a non-empty directory Previously it would fail when renaming to a non-empty directory
but succeed when renaming to an empty directory. but succeed when renaming to an empty directory.
This makes the behavior on Unix correspond to that on other systems. This makes the behavior on Unix correspond to that of other systems.
</p> </p>
<p> <!-- CL 32451 --> <p> <!-- CL 32451 -->
On Windows, long absolute paths are now transparently converted to On Windows, long absolute paths are now transparently converted to
extended-length paths (paths that start with <code>\\?\</code>). extended-length paths (paths that start with <code>\\?\</code>).
This permits the package to work with files whose path names are This permits the package to work with files whose path names are
longer than 260 characters. longer than 260 characters.
</p> </p>
...@@ -1505,16 +1504,15 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1505,16 +1504,15 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
<dl id="path_filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt> <dl id="path_filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt>
<dd> <dd>
<p> <p>
<p>A number of bugs and corner cases on Windows were fixed: A number of bugs and corner cases on Windows were fixed:
<a href="/pkg/path/filepath/#Abs"><code>Abs</code></a> now calls <code>Clean</code> paths as documented, <a href="/pkg/path/filepath/#Abs"><code>Abs</code></a> now calls <code>Clean</code> as documented,
<a href="/pkg/path/filepath/#Glob"><code>Glob</code></a> now matches <a href="/pkg/path/filepath/#Glob"><code>Glob</code></a> now matches
"<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 properly <a href="/pkg/path/filepath/#Clean"><code>Clean</code></a> now properly
handles a leading "<code>..</code>" in the path. handles a leading “<code>..</code>” in the path.
<p> </p>
</dd> </dd>
</dl> </dl>
...@@ -1615,14 +1613,6 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1615,14 +1613,6 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
test or benchmark. test or benchmark.
</p> </p>
<p><!-- CL 31724 -->
The new method
<a href="/pkg/testing/#T.Context"><code>T.Context</code></a>
(and <code>B.Context</code>) returns
a <a href="/pkg/context/#Context"><code>Context</code></a> for
the current running test or benchmark.
</p>
<p><!-- CL 32483 --> <p><!-- CL 32483 -->
The new function The new function
<a href="/pkg/testing/#CoverMode"><code>CoverMode</code></a> <a href="/pkg/testing/#CoverMode"><code>CoverMode</code></a>
...@@ -1635,15 +1625,15 @@ crypto/x509: return error for missing SerialNumber (CL 27238) ...@@ -1635,15 +1625,15 @@ crypto/x509: return error for missing SerialNumber (CL 27238)
Previously, individual test cases would appear to pass, Previously, individual test cases would appear to pass,
and only the overall execution of the test binary would fail. and only the overall execution of the test binary would fail.
</p> </p>
</dd> </dd>
</dl> </dl>
<dl id="unicode"><dt><a href="/pkg/unicode/">unicode</a></dt> <dl id="unicode"><dt><a href="/pkg/unicode/">unicode</a></dt>
<dd> <dd>
<p><!-- CL 30935 --> <p><!-- CL 30935 -->
<code>SimpleFold</code> now returns its argument unchanged <a href="/pkg/unicode/#SimpleFold"><code>SimpleFold</code></a>
if the provided input was an invalid rune. now returns its argument unchanged if the provided input was an invalid rune.
Previously, the implementation failed with an index bounds check panic. Previously, the implementation failed with an index bounds check panic.
</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