summaryrefslogtreecommitdiff
path: root/libgo/go/fmt/doc.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/fmt/doc.go')
-rw-r--r--libgo/go/fmt/doc.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgo/go/fmt/doc.go b/libgo/go/fmt/doc.go
index 4eea48eb6b0..c312914b44a 100644
--- a/libgo/go/fmt/doc.go
+++ b/libgo/go/fmt/doc.go
@@ -62,7 +62,7 @@
For compound objects, the elements are printed using these rules, recursively,
laid out like this:
struct: {field0 field1 ...}
- array, slice: [elem0 elem1 ...]
+ array, slice: [elem0 elem1 ...]
maps: map[key1:value1 key2:value2]
pointer to above: &{}, &[], &map[]
@@ -95,10 +95,10 @@
For floating-point values, width sets the minimum width of the field and
precision sets the number of places after the decimal, if appropriate,
- except that for %g/%G it sets the total number of digits. For example,
- given 123.45 the format %6.2f prints 123.45 while %.4g prints 123.5.
- The default precision for %e and %f is 6; for %g it is the smallest
- number of digits necessary to identify the value uniquely.
+ except that for %g/%G precision sets the total number of significant
+ digits. For example, given 12.345 the format %6.3f prints 12.345 while
+ %.3g prints 12.3. The default precision for %e and %f is 6; for %g it
+ is the smallest number of digits necessary to identify the value uniquely.
For complex numbers, the width and precision apply to the two
components independently and the result is parenthesized, so %f applied
@@ -210,7 +210,7 @@
Too many arguments: %!(EXTRA type=value)
Printf("hi", "guys"): hi%!(EXTRA string=guys)
Too few arguments: %!verb(MISSING)
- Printf("hi%d"): hi %!d(MISSING)
+ Printf("hi%d"): hi%!d(MISSING)
Non-int for width or precision: %!(BADWIDTH) or %!(BADPREC)
Printf("%*s", 4.5, "hi"): %!(BADWIDTH)hi
Printf("%.*s", 4.5, "hi"): %!(BADPREC)hi