From: Rob Pike Date: Fri, 26 Jun 2015 01:52:21 +0000 (+1000) Subject: doc/go1.5.html: first pass over the small API changes X-Git-Tag: go1.5beta1~89 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0ea3f58db285e47810f42f98e35c802a44ce205f;p=gostls13.git doc/go1.5.html: first pass over the small API changes Change-Id: Ib80829e7cbfb319549a224dc18931ca884c8296a Reviewed-on: https://go-review.googlesource.com/11532 Reviewed-by: Russ Cox --- diff --git a/doc/go1.5.html b/doc/go1.5.html index 8eaf5ef612..9c6e06d456 100644 --- a/doc/go1.5.html +++ b/doc/go1.5.html @@ -130,7 +130,7 @@ The old names 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)
 
 
 
  • -TODO fmt: empty slices now print nothing with %x (bug fix) (https://golang.org/cl/8864) +In the 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.
  • -TODO fmt: reflect.Value now prints what it holds (https://golang.org/cl/8731) +Also in the 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>.
  • @@ -379,23 +395,39 @@ TODO go/ast: add Implicit field to ast.EmptyStmt; changed meaning of ast.EmptySt
  • -TODO go/build: reserved GOARCHes for common architectures (https://golang.org/cl/9644) +For forward compatibility the 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.
  • -TODO io: add CopyBuffer, Copy with user-provided buffer (https://golang.org/cl/8730) +The io package +adds a CopyBuffer function +that is like Copy but +uses a caller-provided buffer, permitting control of allocation and buffer size.
  • -TODO log: add SetOutput functions (https://golang.org/cl/2686, https://golang.org/cl/3023) +The 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.
  • -TODO log: add LUTC flag (https://golang.org/cl/8761) +In Go 1.4, 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.
  • -TODO math/big: add Jacobi and Int.ModSqrt (https://golang.org/cl/1886) +The math/big package +adds a new Jacobi +function for integers and a new method +ModSqrt +method for the Int type.
  • @@ -443,59 +475,77 @@ TODO net/smtp: add TLSConnectionState accessor (https://golang.org/cl/2151)
  • -TODO os: add LookupEnv (https://golang.org/cl/9741) -
  • - -
  • -TODO os/signal: add Ignore and Reset (https://golang.org/cl/3580) -
  • - -
  • -TODO runtime, syscall: use SYSCALL instruction on FreeBSD (Go 1.5 now requires FreeBSD 8-STABLE+) (https://golang.org/cl/3020) -
  • - -
  • -TODO runtime, syscall: use get_random_bytes syscall for NaCl (Go 1.5 now requires NaCl SDK pepper-39 or above) (https://golang.org/cl/1755) -
  • - -
  • -TODO runtime/pprof: memory profiles include overall memory statistics by default (https://golang.org/cl/9491) +The os package +has a new LookupEnv function +that is similar to Getenv +but can distinguish between an empty environment variable and a missing one.
  • -TODO strings: add Compare(x, y string) int, for symmetry with bytes.Compare (https://golang.org/cl/2828) +The os/signal package +adds new Ignore and +Reset functions.
  • -TODO syscall: Add Foreground and Pgid to SysProcAttr (https://golang.org/cl/5130) +The runtime/pprof package +by default now includes overall memory statistics in all memory profiles.
  • -TODO syscall: add missing Syscall9 for darwin/amd64 (https://golang.org/cl/6555) +The 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.
  • -TODO syscall: Add GidMappingsEnableSetgroups to linux SysProcAttr (http://golang.org/cl/10670) +In the 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.
  • -TODO testing/quick: support generation of arrays (https://golang.org/cl/3865) +The 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.
  • -TODO testing/quick: generated pointers can now be nil (https://golang.org/cl/10821) +In the 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.
  • -TODO text/template: add Options method (https://golang.org/cl/8462) +Also in the 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.
  • -TODO text/template: huge integers are now parse errors (https://golang.org/cl/9651) +The time package's +Time type has a new method +AppendFormat, +which can be used to avoid allocation when printing a time value.
  • -TODO time: add time.AppendFormat(https://golang.org/cl/1760) +The unicode package and associated +support throughout the system has been upgraded from version 7.0 to +Unicode 8.0.