]> Cypherpunks repositories - gostls13.git/commitdiff
fmt: fix documentation for %g and %G
authorRob Pike <r@golang.org>
Wed, 29 Oct 2014 03:19:03 +0000 (20:19 -0700)
committerRob Pike <r@golang.org>
Wed, 29 Oct 2014 03:19:03 +0000 (20:19 -0700)
It now echoes what strconv.FormatFloat says.

Fixes #9012.

LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/169730043

src/fmt/doc.go

index 304b9e9581eb2ddb5cb77baf360176f8a21a58d1..28387f5d4ba57e93f33eaf07e8827d98eda7ed5d 100644 (file)
@@ -38,8 +38,8 @@
                %E      scientific notation, e.g. -1234.456E+78
                %f      decimal point but no exponent, e.g. 123.456
                %F      synonym for %f
-               %g      whichever of %e or %f produces more compact output
-               %G      whichever of %E or %f produces more compact output
+               %g      %e for large exponents, %f otherwise
+               %G      %E for large exponents, %G otherwise
        String and slice of bytes:
                %s      the uninterpreted bytes of the string or slice
                %q      a double-quoted string safely escaped with Go syntax