Commit d6280909 authored by Russ Cox's avatar Russ Cox

doc/go1.10: update release notes for recent commits

Change-Id: Id6ced9a6c76131263041cdaf5ed17479be075fa6
Reviewed-on: https://go-review.googlesource.com/82075
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
parent ba2db584
......@@ -64,6 +64,19 @@ in particular <a href="#asm">new instructions in the assembler</a>
and improvements to the code generated by the compilers.
</p>
<p id="freebsd">
As <a href="go1.9#freebsd">announced in the Go 1.9 release notes</a>,
Go 1.10 now requires FreeBSD 10.3 or later;
support for FreeBSD 9.3 has been removed.
</p>
<p id="mips">
On 32-bit MIPS systems, the new environment variable settings
<code>GOMIPS=hardfloat</code> (the default) and
<code>GOMIPS=softfloat</code> select whether to use
hardware instructions or software emulation for floating-point computations.
</p>
<h2 id="tools">Tools</h2>
<h3 id="goroot">Default GOROOT &amp; GOTMPDIR</h3>
......@@ -198,19 +211,25 @@ now includes <code>PAUSE</code> and <code>CONT</code> status update
lines to make clearer when <a href="/pkg/testing/#T.Parallel">parallel tests</a> pause and continue.
</p>
<p>
The new <code>go</code> <code>test</code> <code>-failfast</code> flag
disables running additional tests after any test fails.
Note that tests running in parallel with the failing test are allowed to complete.
</p>
<p>
Finally, the new <code>go</code> <code>test</code> <code>-json</code> flag
filters test output through the new command
<code>go</code> <code>tool</code> <code>test2json</code>
to produce a machine-readable JSON-formatted description of test execution.
This should allow the creation of rich presentations of test execution
This allows the creation of rich presentations of test execution
in IDEs and other tools.
</p>
<p>
For more details about all these changes,
see <a href="TODO"><code>go</code> <code>help</code> <code>test</code></a>
see <a href="/cmd/go/#hdr-Test_packages"><code>go</code> <code>help</code> <code>test</code></a>
and the <a href="/cmd/test2json/">test2json documentation</a>.
</p>
......@@ -224,6 +243,12 @@ Also, the documentation has been updated to clarify that
Go structs and Go arrays are not supported in the type signatures of cgo-exported functions.
</p>
<p>
TODO: CL 70890 "permit passing string values directly between Go and C."
<br>
TODO: CL 66332 "special case C ptr types to use uintptr."
</p>
<p>
During toolchain bootstrap, the environment variables <code>CC</code> and <code>CC_FOR_TARGET</code> specify
the default C compiler that the resulting toolchain will use for host and target builds, respectively.
......@@ -235,6 +260,9 @@ Note that these variables only apply during toolchain bootstrap,
to set the defaults used by the resulting toolchain.
Later <code>go</code> <code>build</code> commands refer to the <code>CC</code> environment
variable or else the built-in default.
</p>
<p>
For more details, see the <a href="/cmd/cgo/">cgo documentation</a>.
</p>
......@@ -317,14 +345,13 @@ This release includes a new <a href="/doc/diagnostics.html">overview of availabl
<h3 id="gofmt">Gofmt</h3>
<p>
A few minor details of the default formatting of Go source code have changed.
First, some complex three-index slice expressions previously formatted like
Two minor details of the default formatting of Go source code have changed.
First, certain complex three-index slice expressions previously formatted like
<code>x[i+1</code>&nbsp;<code>:</code>&nbsp;<code>j:k]</code> and now
format with more consistent spacing: <code>x[i+1</code>&nbsp;<code>:</code>&nbsp;<code>j</code>&nbsp;<code>:</code>&nbsp;<code>k]</code>.
Second, single-method interface literals written on a single line,
which are sometimes used in type assertions,
are no longer split onto multiple lines.
Third, blank lines following an opening brace are now always elided.
</p>
<p>
......@@ -540,11 +567,6 @@ Now it also records the user and group names corresponding to those IDs,
as well as the major and minor device numbers for device files.
</p>
<p>
Errors created by the package now begin with a consistent “tar:” prefix.
(Previously they almost all began with a consistent “archive/tar:” prefix.)
TODO: Why are we changing these? (#22740)
</p>
<p>
The new <a href="/pkg/archive/tar/#Header"><code>Header.Format</code></a> field
of type <a href="/pkg/archive/tar/#Format"><code>Format</code></a>
controls which tar header format the <a href="/pkg/archive/tar/#Writer"><code>Writer</code></a> uses.
......@@ -584,13 +606,12 @@ In Go 1.10, the <a href="/pkg/archive/zip/#Reader"><code>Reader</code></a> and <
now support the widely-understood Info-Zip extension that encodes the time separately in the 32-bit Unix “seconds since epoch” form.
The <a href="/pkg/archive/zip/#FileHeader"><code>FileHeader</code></a>'s new <code>Modified</code> field of type <a href="/pkg/time/#Time"><code>time.Time</code></a>
obsoletes the <code>ModifiedTime</code> and <code>ModifiedDate</code> fields, which continue to hold the MS-DOS encoding.
The <a href="/pkg/archive/zip/#FileHeader.ModTime"><code>ModTime</code></a> and
<a href="/pkg/archive/zip/#FileHeader.SetModTime"><code>SetModTime</code></a> methods
now simply read and write the new <code>Modified</code> field.
The <code>Reader</code> and <code>Writer</code> now adopt the common
convention that ZIP archive storing the Unix time encoding store the local time
in the MS-DOS field, so that the time zone offset can be inferred.
TODO: These last bits are not true but probably should be (#22738)
For compatibility, the <a href="/pkg/archive/zip/#FileHeader.ModTime"><code>ModTime</code></a> and
<a href="/pkg/archive/zip/#FileHeader.SetModTime"><code>SetModTime</code></a> methods
behave the same as in earlier releases; new code should use <code>Modified</code> directly.
</p>
<p>
The header for each file in a ZIP archive has a flag bit indicating whether
......@@ -606,10 +627,8 @@ Setting a <code>FileHeader</code>'s new <code>NonUTF8</code> field to true
disables the heuristic entirely for that file.
</p>
<p>
The <code>Writer</code> also now support setting the end-of-central-directory record's comment field,
by setting the <code>Writer</code>'s new <code>Comment</code> field
before calling the <a href="/pkg/archive/zip/#Writer.Close"><code>Close</code></a> method.
TODO: May change (#22737).
The <code>Writer</code> also now supports setting the end-of-central-directory record's comment field,
by calling the <code>Writer</code>'s new <a href="/pkg/archive/zip/#Writer.SetComment"><code>SetComment</code></a> method.
</p>
</dl>
......@@ -676,9 +695,17 @@ Parsed certificates also now report URI names and IP, email, and URI constraints
<code>PermittedURIDomains</code>, and <code>ExcludedURIDomains</code>.
</p>
<p>
The new <a href="/pkg/crypto/x509/#MarshalPKCS1PublicKey"><code>MarshalPKCS1PublicKey</code></a>
and <a href="/pkg/crypto/x509/#ParsePKCS1PublicKey"><code>ParsePKCS1PublicKey</code></a>
functions convert an RSA public key to and from PKCS#1-encoded form.
</p>
<p>
The new <a href="/pkg/crypto/x509/#MarshalPKCS8PrivateKey"><code>MarshalPKCS8PrivateKey</code></a>
function converts a private key to PKCS#8 encoded form.
function converts a private key to PKCS#8-encoded form.
(<a href="/pkg/crypto/x509/#ParsePKCS8PrivateKey"><code>ParsePKCS8PrivateKey</code></a>
has existed since Go 1.)
</p>
</dl>
......@@ -701,6 +728,14 @@ instead of needing to encode all configuration into a string
passed to <a href="/pkg/database/sql/#Open"><code>sql.Open</code></a>.
</p>
<p>
Drivers that want to parse the configuration string only once per <code>sql.DB</code>
instead of once per <a href="/pkg/database/sql/#Conn"><code>sql.Conn</code></a>,
or that want access to each <code>sql.Conn</code>'s underlying context,
can make their <a href="/pkg/database/sql/driver/#Driver"><code>Driver</code></a>
implementations also implement <a href="/pkg/database/sql/driver/#DriverContext"><code>DriverContext</code></a>'s
new <code>OpenConnector</code> method.
</p>
<p>
Drivers that implement <a href="/pkg/database/sql/driver/#ExecerContext"><code>ExecerContext</code></a>
no longer need to implement <a href="/pkg/database/sql/driver/#Execer"><code>Execer</code></a>;
similarly, drivers that implement <a href="/pkg/database/sql/driver/#QueryerContext"><code>QueryerContext</code></a>
......@@ -762,10 +797,19 @@ unless the string is in a struct field with a tag forcing the use of PrintableSt
<code>Marshal</code> also now respects struct tags containing <code>application</code> directives.
</p>
<p>
The new <a href="/pkg/encoding/asn1/#MarshalWithParams"><code>MarshalWithParams</code></a>
function marshals its argument as if the additional params were its associated
struct field tag.
</p>
<p>
<a href="/pkg/encoding/asn1/#Unmarshal"><code>Unmarshal</code></a> now respects
struct field tags using the <code>explicit</code> and <code>tag</code>
directives.
</p>
<p>
Both <code>Marshal</code> and <code>Unmarshal</code> now support a new struct field tag
<code>numeric</code>, indicating an ASN.1 NumericString.
</p>
</dl>
<dl id="encoding/csv"><dt><a href="/pkg/encoding/csv/">encoding/csv</a></dt>
......@@ -780,11 +824,6 @@ or setting <code>Comma</code> and <code>Comment</code> equal to each other.
In the case of a syntax error in a CSV record that spans multiple input lines, <code>Reader</code>
now reports the line on which the record started in the <a href="/pkg/encoding/csv/#ParseError"><code>ParseError</code></a>'s new <code>StartLine</code> field.
</p>
<p>
<code>Reader</code> also no longer strips carriage return characters
appearing before newline characters in multiline quoted strings.
TODO: Maybe not (#22746).
</p>
</dl>
<dl id="encoding/hex"><dt><a href="/pkg/encoding/hex/">encoding/hex</a></dt>
......@@ -824,6 +863,17 @@ that causes it to report inputs with unknown JSON fields as a decoding error.
</p>
</dl>
<dl id="encoding/pem"><dt><a href="/pkg/encoding/pem/">encoding/pem</a></dt>
<dd>
<p>
<a href="/pkg/encoding/pem/#Encode"><code>Encode</code></a>
and
<a href="/pkg/encoding/pem/#EncodeToMemory"><code>EncodeToMemory</code></a>
no longer generate partial output when presented with a
block that is impossible to encode as PEM data.
</p>
</dl>
<dl id="encoding/xml"><dt><a href="/pkg/encoding/xml/">encoding/xml</a></dt>
<dd>
<p>
......@@ -939,6 +989,19 @@ compute square roots.
</p>
</dl>
<dl id="math/cmplx"><dt><a href="/pkg/math/cmplx/">math/cmplx</a></dt>
<dd>
<p>
Branch cuts and other boundary cases in
<a href="/pkg/math/cmplx/#Asin"><code>Asin<code></a>,
<a href="/pkg/math/cmplx/#Asinh"><code>Asinh<code></a>,
<a href="/pkg/math/cmplx/#Atan"><code>Atan<code></a>,
and
<a href="/pkg/math/cmplx/#Sqrt"><code>Sqrt<code></a>
have been corrected to match the definitions used in the C99 standard.
</p>
</dl>
<dl id="math/rand"><dt><a href="/pkg/math/rand/">math/rand</a></dt>
<dd>
<p>
......@@ -946,13 +1009,6 @@ The new <a href="/pkg/math/rand/#Shuffle"> function and corresponding
<a href="/pkg/math/rand/#Rand.Shuffle"><code>Rand.Shuffle</code></a> method
shuffle an input sequence.
</p>
<p>
The existing <a href="/pkg/math/rand/#Perm"> function and corresponding
<a href="/pkg/math/rand/#Rand.Perm"><code>Rand.Perm</code></a> method
have been updated to use a more efficient algorithm, with the result
that the specific permutations they return have changed.
TODO: Remove? (#22744)
</p>
</dl>
<dl id="math"><dt><a href="/pkg/math/">math</a></dt>
......@@ -1042,6 +1098,32 @@ meaning that the client connects to the proxy over HTTPS before issuing a standa
On the server side, <a href="/pkg/net/http/#FileServer"><code>FileServer</code></a> and its single-file equivalent <a href="/pkg/net/http/#ServeFile"><code>ServeFile</code></a>
now apply <code>If-Range</code> checks to <code>HEAD</code> requests.
<code>FileServer</code> also now reports directory read failures to the <a href="/pkg/net/http/#Server"><code>Server</code></a>'s <code>ErrorLog</code>.
The content-serving handlers also now omit the <code>Content-Type</code> header when serving zero-length content.
</p>
<p>
<a href="/pkg/net/http/#ResponseWriter"><code>ResponseWriter</code></a>'s <code>WriteHeader</code> method now panics
if passed an invalid (non-3-digit) status code.
</p>
<p>
<a href="/pkg/net/http/#Redirect"><code>Redirect</code></a> now sets the <code>Content-Type</code> header before writing its HTTP response.
</p>
</dl>
<dl id="net/http/httputil"><dt><a href="/pkg/net/http/httputil/">net/http/httputil</a></dt>
<dd>
<p>
The <a href="/pkg/net/http/httputil/#ReverseProxy">ReverseProxy</a> now invokes
the <code>
On the client side, an HTTP proxy (most commonly configured by
<a href="/pkg/net/http/#ProxyFromEnvironment"><code>ProxyFromEnvironment</code></a>)
can now be specified as an <code>https://</code> URL,
meaning that the client connects to the proxy over HTTPS before issuing a standard, proxied HTTP request.
(Previously, HTTP proxy URLs were required to begin with <code>http://</code> or <code>socks5://</code>.)
</p>
<p>
On the server side, <a href="/pkg/net/http/#FileServer"><code>FileServer</code></a> and its single-file equivalent <a href="/pkg/net/http/#ServeFile"><code>ServeFile</code></a>
now apply <code>If-Range</code> checks to <code>HEAD</code> requests.
<code>FileServer</code> also now reports directory read failures to the <a href="/pkg/net/http/#Server"><code>Server</code></a>'s <code>ErrorLog</code>.
</p>
<p>
<a href="/pkg/net/http/#Redirect"><code>Redirect</code></a> now sets the <code>Content-Type</code> header before writing its HTTP response.
......@@ -1073,7 +1155,9 @@ and <a href="/pkg/net/smtp/#Client.Verify"><code>Verify</code></a> methods.
<dd>
<p>
<a href="/pkg/net/textproto/#ReadMIMEHeader"><code>ReadMIMEHeader</code></a>
now discards continuation (indented) header lines that appear before the first actual (unindented) header line.
now rejects any header that begins with a continuation (indented) header line.
Previously a header with an indented first line was treated as if the first line
were not indented.
</p>
</dl>
......@@ -1111,6 +1195,12 @@ For example, this can happen if code adds a host prefix
like <code>http://host/</code> to a path like <code>/my/api</code>,
resulting in a URL with a doubled slash: <code>http://host//my/api</code>.
</p>
<p>
<a href="/pkg/net/url/#UserInfo"><code>UserInfo</code></a>'s methods
now treat a nil receiver as equivalent to a pointer to a zero <code>UserInfo</code>.
Previously, they panicked.
</p>
</dl>
<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
......@@ -1224,7 +1314,8 @@ environment variable before looking in the default system-specific list of
known installation locations or in <code>$GOROOT/lib/time/zoneinfo.zip</code>.
</p>
<p>
TODO: Maybe CL 68890.
The new function <a href="/pkg/time/#LoadLocationFromTZData"><code>LoadLocationFromTZData</code></a>
allows conversion of IANA time zone file data to a <a href="/pkg/time/#Location"><code>Location</code></a>.
</p>
</dl>
......
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