From: Rob Pike 6g
, 8g
and so on are gone; instead there
is just one binary, accessible as go
tool
compile
,
that compiles Go source into binaries suitable for the architecture and operating system
specified by $GOARCH
and $GOOS
.
-Similarly, there is now one linker (go
tool
link
)
+Simlarly, there is now one linker (go
tool
link
)
and one assembler (go
tool
asm
).
The linker was translated automatically from the old C implementation,
but the assembler is a new native Go implementation discussed
@@ -206,6 +206,15 @@ The new port linux/arm64
is mostly in place, but cgo
is only supported using external linking.
+On FreeBSD, Go 1.5 requires FreeBSD 8-STABLE+ because of its new use of the SYSCALL
instruction.
+
+On NaCl, Go 1.5 requires SDK version pepper-39 or above because it now uses the
+get_random_bytes
system call.
+
API additions and behavior changes: @@ -367,11 +376,18 @@ TODO encoding/base64: add unpadded encodings (https://golang.org/cl/1511)
fmt
package,
+empty slices now produce no output with the %x
verb
+even when width is applied. For slices the modifiers apply elementwise but in 1.4 if the
+slice was empty, they applied globally, an inconsistency.
+For instance, in Go 1.4 an empty byte slice prints '0000' with verb "%04x"; in 1.5 it prints nothing.
fmt
package,
+a value of type Value
now
+prints what it holds, rather than use the reflect.Value
's Stringer
+method, which produces things like <int Value>
.
go/build
package
+reserves GOARCH
values for a number of architectures that Go might support one day.
+This is not a promise that it will.
io
package
+adds a CopyBuffer
function
+that is like Copy
but
+uses a caller-provided buffer, permitting control of allocation and buffer size.
log
package
+has a new LUTC
flag
+that causes time stamps to be printed in the UTC time zone.
+It also adds a SetOutput
function
+to set the output destination for the standard logger
+and a corresponding method for user-created loggers.
Max
was not detecting all possible NaN bit patterns.
+This is fixed in Go 1.5, so programs that use math.Max
on data including NaNs may behave differently,
+but now correctly according to the IEEE754 definition of NaNs.
math/big
package
+adds a new Jacobi
+function for integers and a new method
+ModSqrt
+method for the Int
type.
os
package
+has a new LookupEnv
function
+that is similar to Getenv
+but can distinguish between an empty environment variable and a missing one.
os/signal
package
+adds new Ignore
and
+Reset
functions.
runtime/pprof
package
+by default now includes overall memory statistics in all memory profiles.
strings
package
+has a new Compare
function.
+This is present to provide symmetry with the bytes
package
+but is otherwise unnecessary as strings support comparison natively.
syscall
package,
+the Linux SysProcAttr
struct now has a
+GidMappingsEnableSetgroups
field, made necessary
+by security changes in Linux 3.19.
+On all Unix systems, the struct also has new Foreground
and Pgid
fields
+to provide more control when exec'ing.
+On Darwin, there is now a Syscall9
function
+to support calls with too many arguments.
testing/quick
will now
+generate nil
values for pointer types,
+making it possible to use with recursive data structures.
+Also, the package now supports generation of array types.
text/template
and
+html/template
packages,
+integer constants too large to be represented as a Go integer now trigger a
+parse error. Before, they were silently converted to floating point, losing
+precision.
text/template
and
+html/template
packages,
+a new Option
type
+allows customization of the behavior of the template during execution.
+The sole implemented option allows control over how a missing key is
+handled when indexing a map.
+The default, which can now be overridden, is as before: to continue with an invalid value.
time
package's
+Time
type has a new method
+AppendFormat
,
+which can be used to avoid allocation when printing a time value.
unicode
package and associated
+support throughout the system has been upgraded from version 7.0 to
+Unicode 8.0.