From 6fe9c4a7bd7e7054071586c9e90f901fa6043ba9 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 1 Jul 2015 08:48:19 +1000 Subject: [PATCH] doc: more library in go1.5.html Everything in the library but crypto and net. Change-Id: I89b21b9621e6d338fa1891da0eabba5d7d2fe349 Reviewed-on: https://go-review.googlesource.com/11820 Reviewed-by: Russ Cox --- doc/go1.5.html | 109 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 94 insertions(+), 15 deletions(-) diff --git a/doc/go1.5.html b/doc/go1.5.html index 0ef5f7c819..e8a1392340 100644 --- a/doc/go1.5.html +++ b/doc/go1.5.html @@ -216,15 +216,6 @@ On NaCl, Go 1.5 requires SDK version pepper-39 or above because it now uses the

-
-API additions and behavior changes:
-
-flag: new nicer format for PrintDefaults (https://golang.org/cl/7330)
-math/big: add arbitrary precision Floats (many cl's)
-mime/quotedprintable: new package (https://golang.org/cl/5940 + others)
-reflect: add ArrayOf (https://golang.org/cl/4111)
-reflect: add FuncOf (https://golang.org/cl/1996)
-
 Tools:
 
 build: external linking support for windows (https://golang.org/cl/7163, 7282, 7283, 7284, 7534, 7535)
@@ -292,17 +283,100 @@ ARM assembly syntax has had some features removed.
 	- R(0) to refer to R0.
 		Some macros use this to a great extent. Again, it's easy just to
 		use a #define to rename a register.
-	
+
 Also expression evaluation now uses uint64s instead of signed integers and the
 precedence of operators is now Go-like rather than C-like.
+
+ +

Core library

+ +

Flag

+ +

+The flag package's +PrintDefaults +function, and method on FlagSet, +have been modified to create nicer usage messages. +The format has been changed to be more human-friendly and in the usage +messages a word quoted with `backquotes` is taken to be the name of the +flag's operand to display in the usage message. +For instance, a flag created with the invocation, +

-Standard library hardening -35 bugs found by randomized testing with go-fuzz (https://github.com/dvyukov/go-fuzz) -were fixed in fmt, archive/zip, archive/tar, encoding/gob, image/jpeg, image/png, -image/gif, compress/flate, text/template, html/template. The fixes harden implementation -against incorrect and malicious inputs. +
+cpuFlag = flag.Int("cpu", 1, "run `N` processes in parallel")
 
+

+will show the help message, +

+ +
+-cpu N
+    	run N processes in parallel (default 1)
+
+ +

+Also, the default is now listed only when it is not the zero value for the type. +

+ +

Floats in math/big

+ +

+The math/big package +has a new, fundamental data type, +Float, +which implements arbitrary-precision floating-point numbers. +A Float value is represented by a boolean sign, +a variable-length mantissa, and a 32-bit fixed-size signed exponent. +The precision of a Float (the mantissa size in bits) +can be specified explicitly or is otherwise determined by the first +operation that creates the value. +Once created, the size of a Float's mantissa may be modified with the +SetPrec method. +Floats support the concept of infinities, such as are created by +overflow, but values that would lead to the equivalent of IEEE 754 NaNs +trigger a panic. +Float operations support all IEEE-754 rounding modes. +When the precision is set to 24 (53) bits, +operations that stay within the range of normalized float32 +(float64) +values produce the same results as the corresponding IEEE-754 +arithmetic on those values. +

+ +

Reflect

+ +

+The reflect package +has two new functions: ArrayOf +and FuncOf. +These functions, analogous to the extant +SliceOffunction, +create new types at runtime to describe arrays and functions. +

+ +

Hardening

+ +

+Several dozen bugs were found in the standard library +through randomized testing with the +go-fuzz tool. +Bugs were fixed in the +archive/tar, +archive/zip, +compress/flate, +encoding/gob, +fmt, +html/template, +image/gif, +image/jpeg, +image/png, and +text/template, +packages. +The fixes harden the implementation against incorrect and malicious inputs. +

+

Minor changes to the library