From 0c5c7c3446a0917d830579b2f3f7582b759695a3 Mon Sep 17 00:00:00 2001
From: Brad Fitzpatrick
When explicitly converting structs, tags are now ignored for structural type identity.
- See change 24190 for details.
+ See language specification for details.
The language specification now only requires that implementations
- support up to 16-bit exponents in constants. This does not affect
+ support up to 16-bit exponents in floating-point constants. This does not affect
either the gc
or gccgo
compilers, both of
which still support 32-bit exponents.
VMOVSLDUP
.
For 64-bit PPC systems, the common vector scalar instructions have been
-added. See change 30510.
+added:
+LXS
,
+LXSDX
,
+LXSI
,
+LXSIWAX
,
+LXSIWZX
,
+LXV
,
+LXVD2X
,
+LXVDSX
,
+LXVW4X
,
+MFVSR
,
+MFVSRD
,
+MFVSRWZ
,
+MTVSR
,
+MTVSRD
,
+MTVSRWA
,
+MTVSRWZ
,
+STXS
,
+STXSDX
,
+STXSI
,
+STXSIWX
,
+STXV
,
+STXVD2X
,
+STXVW4X
,
+XSCV
,
+XSCVDPSP
,
+XSCVDPSPN
,
+XSCVDPSXDS
,
+XSCVDPSXWS
,
+XSCVDPUXDS
,
+XSCVDPUXWS
,
+XSCVSPDP
,
+XSCVSPDPN
,
+XSCVSXDDP
,
+XSCVSXDSP
,
+XSCVUXDDP
,
+XSCVUXDSP
,
+XSCVX
,
+XSCVXP
,
+XVCV
,
+XVCVDPSP
,
+XVCVDPSXDS
,
+XVCVDPSXWS
,
+XVCVDPUXDS
,
+XVCVDPUXWS
,
+XVCVSPDP
,
+XVCVSPSXDS
,
+XVCVSPSXWS
,
+XVCVSPUXDS
,
+XVCVSPUXWS
,
+XVCVSXDDP
,
+XVCVSXDSP
,
+XVCVSXWDP
,
+XVCVSXWSP
,
+XVCVUXDDP
,
+XVCVUXDSP
,
+XVCVUXWDP
,
+XVCVUXWSP
,
+XVCVX
,
+XVCVXP
,
+XXLAND
,
+XXLANDC
,
+XXLANDQ
,
+XXLEQV
,
+XXLNAND
,
+XXLNOR
,
+XXLOR
,
+XXLORC
,
+XXLORQ
,
+XXLXOR
,
+XXMRG
,
+XXMRGHW
,
+XXMRGLW
,
+XXPERM
,
+XXPERMDI
,
+XXSEL
,
+XXSI
,
+XXSLDWI
,
+XXSPLT
, and
+XXSPLTW
.
-The yacc
(previously available via
+The yacc
tool (previously available via
âgo
tool
yacc
â)
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 and is available via
-go get golang.org/x/tools/cmd/goyacc
.
+go
get
golang.org/x/tools/cmd/goyacc
.
-The temporary -ssa=0
flag introduced in Go 1.7 to disable
-the new backend has been removed in Go 1.8.
+ The temporary -ssa=0
compiler flag introduced in Go 1.7
+ to disable the new backend has been removed in Go 1.8.
@@ -180,13 +259,17 @@ is unchanged, but there are a number of changes worth noting.
-A new âgo
bug
â command helps users file bug reports.
+ A new
+ âgo
+ bug
â command helps users file bug reports.
- The âgo
doc
â command
+ The
+ âgo
+ doc
â command
now groups constants and variables with their type,
following the behavior of
godoc
.
@@ -203,14 +286,14 @@ A new âgo
bug
â command helps users file bug report
explicitly.
Go now supports a âplugin
â build mode for generating
- plug-ins written in Go, and a
+ plugins written in Go, and a
new plugin
package for
- loading such plug-ins at run time. Plug-ins support is only currently
- available on Linux and Darwin.
+ loading such plugins at run time. Plugin support is only currently
+ available on Linux and macOS.
-Garbage collection pauses should be significantly shorter than they -were in Go 1.7, often as low as 10 microseconds and usually under 100 -microseconds. -See the - -document on eliminating stop-the-world stack re-scanning for details. -More work remains for Go 1.9. + Garbage collection pauses should be significantly shorter than they + were in Go 1.7, often as low as 10 microseconds and usually under 100 + microseconds. + See the + document on eliminating stop-the-world stack re-scanning + for details. More work remains for Go 1.9.
defer
calls are now about twice as fast.
+ The overhead of deferred + function calls has been reduced by half. +
NoCompression
mode, now produces a consistent output that is not dependent on
- the size of the input buffer to the
+ the size of the slices passed to the
Write
method.
@@ -399,7 +485,7 @@ in mind.
field is the zero value.
In previous releases of Go, the Writer
would encode
- a non-sensible value.
+ a nonsensical value.
Similarly,
the Reader
@@ -502,7 +588,10 @@ pkg debug/pe, type StringTable []uint8
- The new Encoding.Strict
method returns an Encoding
that causes the decoder to return an error when the trailing padding bits are not zero.
+ The new
+ Encoding.Strict
+ method returns an Encoding
that causes the decoder
+ to return an error when the trailing padding bits are not zero.
- Numbers are now formatted in the same floating point format as they are in ES6.
+ Marshal encodes floating-point numbers using the same format as in ES6,
+ preferring decimal (not exponential) notation for a wider range of values.
+ In particular, all floating-point integers up to 264 format the
+ same as the equivalent int64
representation.
Implementations
of Unmarshaler
are now called with the literal "null
" and can
- decide what to do with it.
+ decide how to handle it.
- There is a new
- method Rand.Uint64
- to return uint64
values.
+
+ The new Rand.Uint64
+ method returns uint64
values. The
+ new Rand.Source64
+ interface describes sources capable of generating such values
+ directly; otherwise the Rand.Uint64
method
+ constructs a uint64
from two calls
+ to Rand.Source
's Int63
method.
Server
now
- has new configuration options
- ReadHeaderTimeout
and IdleTimeout
.
- The previously ill-defined WriteTimeout
is now
- documented.
+ The Server
+ adds configuration options
+ ReadHeaderTimeout
and IdleTimeout
+ and documents WriteTimeout
.
ResponseWriter.WriteHeader
). The old way
- continues to work, but when the trailer is only known after the
- header has been written, see the
- new TrailerPrefix
.TrailerPrefix
+ mechanism.
+ Handler
now has a supported mechanism to abort a
- response: panicking with
+ A Handler
can now abort a response by panicking
+ with the error
ErrAbortHandler
.
ResponseWriter
has been hijacked: Write
zero bytes to it.
- While this previously returned
- ErrHijacked
, now
- it also does so without spamming the server's error log.
+ A Write
of zero bytes to a
+ ResponseWriter
+ is now defined as a
+ way to test whether a ResponseWriter
has been hijacked:
+ if so, the Write
returns
+ ErrHijacked
+ without printing an error
+ to the server's error log.
Client & Transport changes:
Client
now copies request headers on redirect.
+ The Client
+ now copies most request headers on redirect. Authentication-specific
+ headers are only sent to the same origin or subdomains thereof.
+ Cookies are not sent again, unless they were set explicitly.
+ TODO: verify this, and link to docs once https://github.com/golang/go/issues/18096
+ is fixed.
Transport
now supports international domain names.
+ The Transport
+ now supports international domain names. Consequently, so do
+ Get and other helpers.
Client
now supports 307 and 308 redirects.
- If the redirect involves re-sending the request body,
+ If the redirect requires resending the request body,
the request must have the new
Request.GetBody
field defined.
@@ -730,7 +834,7 @@ pkg debug/pe, type StringTable []uint8
DefaultTransport.Dialer
- now enables DualStack
("Happy Eyeballs") support,
+ now enables DualStack
("Happy Eyeballs") support,
to use IPv4 as a backup if it looks like IPv6 might be
failing.
- Empty quoted strings are now allowed in the name part of an
- address. That is, this is now a legal address:
- "" <gopher@example.com>
+ Empty quoted strings are once again allowed in the name part of
+ an address. That is, Go 1.4 and earlier accepted
+ "" <gopher@example.com>
,
+ but Go 1.5 introduced a bug that rejected this address.
+ The address is recognized again.
- The ParseDate
- function has been exported.
+ The
+ Header.Date
+ method has always provided a way to parse
+ the Date:
header.
+ A new function
+ ParseDate
+ allows parsing dates found in other
+ header lines, such as the Resent-Date:
header.
- If implementations of the Auth
- interface return an empty toServer
value, the package
- no longer sends trailing whitespace after the SMTP AUTH
- command, which some servers rejected.
+ If an implementation of
+ the Auth
+ interface's Start
method returns an
+ empty toServer
value, the package no longer sends
+ trailing whitespace in the SMTP AUTH
command,
+ which some servers rejected.
PathUnescape
are similar to the query escaping and unescaping functions but
- don't treat spaces specially.
+ for path elements.
The new methods
URL.Hostname
@@ -796,13 +910,18 @@ pkg debug/pe, type StringTable []uint8
The URL
type now implements
encoding.BinaryMarshaler
and
- encoding.BinaryUnmarshaler
.
+ encoding.BinaryUnmarshaler
,
+ making it possible to process URLs in gob data.
- Parse
now rejects relative URLs containing a ":
" in
- the first path segment. Such paths should be prefixed with "./
".
- The URL.String
method now prepends "./
" to such paths.
+ Following RFC 3986,
+ Parse
+ now rejects URLs like this_that:other/thing
instead of
+ interpreting them as relative paths (this_that
is not a valid scheme).
+ To force interpretation as a relative path,
+ such URLs should be prefixed with "./"
.
+ The URL.String
method now inserts this prefix as needed.
The new function
Swapper
was
- added to support
- the new sort.Slice
- support.
+ added to support sort.Slice
.
The Unquote
function now strips carriage returns (\r
) in
- backquoted raw strings.
+ backquoted raw strings, following the
+ Go language semantics.
Since
function.
- ParseDuration
now accepts long fractional parts.
+ ParseDuration
+ now accepts long fractional parts.
+
Parse
now validates days that are too small, in
@@ -886,12 +1007,14 @@ pkg debug/pe, type StringTable []uint8
The new function
CoverMode
- reports what the test coverage mode is set to.
+ reports the test coverage mode.
Tests and benchmarks are now marked as failed if the race detector is enabled and a data race occurs during execution. + Previously, individual test cases would appear to pass, + and only the overall execution of the test binary would fail.
@@ -902,17 +1025,7 @@ pkg debug/pe, type StringTable []uint8
SimpleFold
now returns its argument unchanged
if the provided input was an invalid rune.
-
- + Previously, the implementation failed with an index bounds check panic.