<p>
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.
- To identify whether a Linux system is ARMv6K or later, run <code>go tool dist -check-armv6k</code>
- (to facilitate testing, it is also possible to just copy the dist command to the
+ To identify whether a Linux system is ARMv6K or later, run
+ “<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)
and if the program terminates with output "ARMv6K supported." then the system
implements ARMv6K or later.
<code>MOVSHDUP</code>,
<code>MOVSLDUP</code>,
<code>VMOVDDUP</code>,
-<code>VMOVSHDUP</code>,
-and <code>VMOVSLDUP</code>.</p>
+<code>VMOVSHDUP</code>, and
+<code>VMOVSLDUP</code>.
+</p>
<p>
For 64-bit PPC systems, the common vector scalar instructions have been
<code>XXSEL</code>,
<code>XXSI</code>,
<code>XXSLDWI</code>,
-<code>XXSPLT</code>, and
+<code>XXSPLT</code>, and
<code>XXSPLTW</code>.
</p>
<p> <!-- CL 27324, CL 27325 -->
The <code>yacc</code> tool (previously available by running
-“<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.
+“<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.
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>.
</p>
<p> <!-- CL 33157 -->
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.
</p>
<p>Vet is stricter in some ways and looser where it
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,
non-space-separated struct tags,
deferred calls to HTTP <code>Response.Body.Close</code>
- before checking errors,
- indexed arguments in <code>Printf</code>,
- and improves existing checks.</p>
+ before checking errors, and
+ indexed arguments in <code>Printf</code>.
+ It also improves existing checks.</p>
</p>
<h3 id="compiler">Compiler Toolchain</h3>
<p> <!-- CL 29991 -->
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
always used by earlier releases. This is intended to make it easier
to cross-compile
<p>
The new
- “<a href="/cmd/go/#hdr-Print_information_for_bug_reports"><code>go</code>
- <code>bug</code></a>” command starts a bug report on GitHub, prefilled
+ “<a href="/cmd/go/#hdr-Print_information_for_bug_reports"><code>go</code> <code>bug</code></a>”
+ command starts a bug report on GitHub, prefilled
with information about the current system.
</p>
<p> <!-- CL 25419 -->
The
- “<a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol"><code>go</code>
- <code>doc</code></a>” command
- now groups constants and variables with their type,
+ “<a href="/cmd/go/#hdr-Show_documentation_for_package_or_symbol"><code>go</code> <code>doc</code></a>”
+ command now groups constants and variables with their type,
following the behavior of
<a href="/cmd/godoc/"><code>godoc</code></a>.
</p>
<h3 id="memstats">MemStats Documentation</h3>
<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.
</p>
<a href="/pkg/strings/"><code>strings</code></a>,
<a href="/pkg/syscall/"><code>syscall</code></a>,
<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.
</p>
takes a context argument.</li>
<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>
- <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
<a href="/pkg/net/#Resolver"><code>net.Resolver</code></a> now
take a context.</li>
<p>
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.
</p>
<p>
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>
-in mind. The follow sections list the user visible changes and additions.
-Optimizations and bug fixes are not listed.
+in mind. The following sections list the user visible changes and additions.
+Optimizations and minor bug fixes are not listed.
</p>
<dl id="archive_tar"><dt><a href="/pkg/archive/tar/">archive/tar</a></dt>
There have been some minor fixes to the encoder to improve the
compression ratio in certain situations. As a result, the exact
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.
</p>
- <p>
+ <p> <!-- CL 31174 -->
The encoder, when operating in
<a href="/pkg/compress/flate/#NoCompression"><code>NoCompression</code></a>
mode, now produces a consistent output that is not dependent on
AES-128-CBC cipher suites with SHA-256 are also
now supported.
</p>
-
+
</dd>
</dl>
at <code>/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem</code>
on Linux, to support RHEL and CentOS.
</p>
-
+
</dd>
</dl>
-
+
<dl id="database_sql"><dt><a href="/pkg/database/sql/">database/sql</a></dt>
<dd>
<p>
- The package now supports <code>context.Context</code>. There are new methods
- 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.PrepareContext"><code>DB.PrepareContext</code></a>
- that take context arguments. Using the new <code>Context</code> methods ensures that
- connections are closed and returned to the connection pool when the
- request is done; enables canceling in-progress queries
- should the driver support that; and allows the database
- pool to cancel waiting for the next available connection.
+ The package now supports <code>context.Context</code>. There are new methods
+ 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.PrepareContext"><code>DB.PrepareContext</code></a>
+ that take context arguments. Using the new <code>Context</code> methods ensures that
+ connections are closed and returned to the connection pool when the
+ request is done; enables canceling in-progress queries
+ should the driver support that; and allows the database
+ pool to cancel waiting for the next available connection.
</p>
<p>
The <a href="/pkg/database/sql#IsolationLevel"><code>IsolationLevel</code></a>
- 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
- <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
- 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>.
- </p>
- <p>
+ 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
+ <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
+ 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>.
+ </p>
+ <p>
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>
- which can include SQL type information, column type lengths, and the Go type.
- </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>
+ 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.
+ </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>
+ 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
+ <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>
</dl>
<a href="/pkg/debug/pe/#StringTable"><code>StringTable</code></a>,
the method
<a href="/pkg/debug/pe/#COFFSymbol.FullName"><code>COFFSymbol.FullName</code></a>,
- and
- <a href="/pkg/debug/pe/#File"><code>File</code></a>
- fields
- <a href="/pkg/debug/pe/#File.COFFSymbols"><code>COFFSymbols</code></a> and
- <a href="/pkg/debug/pe/#File.StringTable"><code>StringTable</code></a>.
+ and the fields
+ <a href="/pkg/debug/pe/#File.COFFSymbols"><code>File.COFFSymbols</code></a> and
+ <a href="/pkg/debug/pe/#File.StringTable"><code>File.StringTable</code></a>.
</p>
</dd>
</dl>
</p>
<p> <!-- CL 30944 -->
-
In previous versions of Go, unmarshaling a JSON <code>null</code> into an
<a href="/pkg/encoding/json/#Unmarshaler"><code>Unmarshaler</code></a>
was considered a no-op; now the <code>Unmarshaler</code>'s
<a href="/pkg/math/big/#Int.ModInverse"><code>Int.ModInverse</code></a>
now supports negative numbers.
</p>
-
+
</dd>
</dl>
<a href="/pkg/mime/#ParseMediaType"><code>ParseMediaType</code></a>
now preserves unnecessary backslash escapes as literals,
in order to support MSIE.
- When MSIE sends a full file path (in "intranet mode"), it does not
- escape backslashes: <code>"C:\dev\go\foo.txt"</code>, not
- <code>"C:\\dev\\go\\foo.txt"</code>.
+ When MSIE sends a full file path (in “intranet mode”), it does not
+ escape backslashes: “<code>C:\dev\go\foo.txt</code>”, not
+ “<code>C:\\dev\\go\\foo.txt</code>”.
If we see an unnecessary backslash escape, we now assume it is from MSIE
and intended as a literal backslash.
No known MIME generators emit unnecessary backslash escapes
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
<dd>
-
+
<p><!-- CL 30164, CL 33473 -->
The <a href="/pkg/net/#Conn"><code>Conn</code></a> documentation
has been updated to clarify expectations of an interface
</p>
<p><!-- CL 29951 -->
- The new <a href="/pkg/net/#Buffers"><code>Buffers</code></a> types permits
- more efficiently writing to the network from multiple discontiguous buffers
+ The new <a href="/pkg/net/#Buffers"><code>Buffers</code></a> type permits
+ writing to the network more efficiently from multiple discontiguous buffers
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>).
</p>
</p>
<p><!-- CL 29233, CL 24901 -->
- 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
+ The Go DNS resolver now supports <code>resolv.conf</code>'s “<code>rotate</code>”
+ 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>.
</p>
<a href="/pkg/net/http/#ServeContent"><code>ServeContent</code></a>
now support HTTP <code>If-Match</code> conditional requests,
in addition to the previous <code>If-None-Match</code>
- support.
+ support for ETags properly formatted according to RFC 7232, section 2.3.
</li>
</ul>
existing <a href="/pkg/net/http/#CloseNotifier"><code>CloseNotifier</code></a>
support. This functionality requires that the underlying
<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><!-- 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
<a href="/pkg/net/http/#TrailerPrefix"><code>TrailerPrefix</code></a>
mechanism.
<p>Client & Transport changes:</p>
<ul>
- <li><!-- CL 28930 -->
+ <li><!-- CL 28930, CL 31435 -->
The <a href="/pkg/net/http/#Client"><code>Client</code></a>
now copies most request headers on redirect. See
<a href="/pkg/net/http/#Client">the documentation</a>
<li> <!-- CL 28077 -->
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,
- 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.
</li>
<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.
</p>
-
+
</dd>
</dl>
<p> <!-- CL 32176 -->
Empty quoted strings are once again allowed in the name part of
an address. That is, Go 1.4 and earlier accepted
- <code>"" <gopher@example.com></code>,
+ <code>""</code> <code><gopher@example.com></code>,
but Go 1.5 introduced a bug that rejected this address.
The address is recognized again.
</p>
allows parsing dates found in other
header lines, such as the <code>Resent-Date:</code> header.
</p>
-
+
</dd>
</dl>
<dd>
<p> <!-- CL 33143 -->
- If an implementation of
- the <a href="/pkg/net/smtp/#Auth"><code>Auth</code></a>
- interface's <code>Start</code> method returns an
- empty <code>toServer</code> value, the package no longer sends
+ If an implementation of the
+ <a href="/pkg/net/smtp/#Auth"><code>Auth.Start</code></a>
+ method returns an empty <code>toServer</code> value,
+ the package no longer sends
trailing whitespace in the SMTP <code>AUTH</code> command,
which some servers rejected.
</p>
<dl id="net_url"><dt><a href="/pkg/net/url/">net/url</a></dt>
<dd>
- <p> <!-- CL 31322 --> The new functions
+ <p> <!-- CL 31322 -->
+ The new functions
<a href="/pkg/net/url/#PathEscape"><code>PathEscape</code></a>
and
<a href="/pkg/net/url/#PathUnescape"><code>PathUnescape</code></a>
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>
and
<a href="/pkg/net/url/#URL.Port"><code>URL.Port</code></a>
correctly handling the case where the port may not be present.
</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>
now properly handles paths with escaped bytes without losing
the escaping.
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).
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.
</p>
<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
<dd>
- <p>
+ <p> <!-- CL 16551 -->
The new function
<a href="/pkg/os/#Executable"><code>Executable</code></a> returns
the path name of the running executable.
existing empty directory.
Previously it would fail when renaming to a non-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> <!-- CL 32451 -->
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
longer than 260 characters.
</p>
<dl id="path_filepath"><dt><a href="/pkg/path/filepath/">path/filepath</a></dt>
<dd>
<p>
- <p>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 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> as documented,
<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
- correctly handles "<code>C:.</code>", and
+ correctly handles “<code>C:.</code>”, and
<a href="/pkg/path/filepath/#Clean"><code>Clean</code></a> now properly
- handles a leading "<code>..</code>" in the path.
- <p>
-
+ handles a leading “<code>..</code>” in the path.
+ </p>
</dd>
</dl>
test or benchmark.
</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 -->
The new function
<a href="/pkg/testing/#CoverMode"><code>CoverMode</code></a>
Previously, individual test cases would appear to pass,
and only the overall execution of the test binary would fail.
</p>
-
+
</dd>
</dl>
<dl id="unicode"><dt><a href="/pkg/unicode/">unicode</a></dt>
<dd>
<p><!-- CL 30935 -->
- <code>SimpleFold</code> now returns its argument unchanged
- if the provided input was an invalid rune.
+ <a href="/pkg/unicode/#SimpleFold"><code>SimpleFold</code></a>
+ now returns its argument unchanged if the provided input was an invalid rune.
Previously, the implementation failed with an index bounds check panic.
</p>
</dd>