diff options
author | Rob Pike <r@golang.org> | 2014-10-28 20:19:03 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2014-10-28 20:19:03 -0700 |
commit | c88ba199e2cf24b6dff3d069b50d3bccda4c1552 (patch) | |
tree | 90003b6c98c540363fa02f8257c0d0adf79e42f8 | |
parent | ce7c8fe0fd171bb09296c3dd4d8ca419e28ac5d0 (diff) | |
download | go-c88ba199e2cf24b6dff3d069b50d3bccda4c1552.tar.gz go-c88ba199e2cf24b6dff3d069b50d3bccda4c1552.zip |
fmt: fix documentation for %g and %G
It now echoes what strconv.FormatFloat says.
Fixes #9012.
LGTM=rsc
R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/169730043
-rw-r--r-- | src/fmt/doc.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fmt/doc.go b/src/fmt/doc.go index 304b9e9581..28387f5d4b 100644 --- a/src/fmt/doc.go +++ b/src/fmt/doc.go @@ -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 |