From ffcd7c77ba223188fa35be495f65ae5c3d265914 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Tue, 28 Oct 2014 20:19:03 -0700 Subject: fmt: fix documentation for %g and %G It now echoes what strconv.FormatFloat says. Fixes issue 9012. LGTM=rsc R=golang-codereviews, rsc CC=golang-codereviews https://codereview.appspot.com/169730043 --- src/fmt/doc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fmt') diff --git a/src/fmt/doc.go b/src/fmt/doc.go index 304b9e958..28387f5d4 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 -- cgit v1.2.1