aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/fmt/doc.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-12-02 19:34:41 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-12-02 19:34:41 +0000
commit506cf9aaead4f5519f5549a918d285365b44e989 (patch)
treefe0344f264049738dca876a6dd2f69e96621ca17 /libgo/go/fmt/doc.go
parentbfa9b58039ceacb1bae803fbbfb049b93540f2a7 (diff)
downloadgcc-506cf9aaead4f5519f5549a918d285365b44e989.zip
gcc-506cf9aaead4f5519f5549a918d285365b44e989.tar.gz
gcc-506cf9aaead4f5519f5549a918d285365b44e989.tar.bz2
libgo: Update to weekly.2011-11-01.
From-SVN: r181938
Diffstat (limited to 'libgo/go/fmt/doc.go')
-rw-r--r--libgo/go/fmt/doc.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/libgo/go/fmt/doc.go b/libgo/go/fmt/doc.go
index c993e57..6713f0a1 100644
--- a/libgo/go/fmt/doc.go
+++ b/libgo/go/fmt/doc.go
@@ -89,10 +89,14 @@
If an operand implements interface Formatter, that interface
can be used for fine control of formatting.
- If an operand implements method String() string that method
+ Next, if an operand implements the error interface, the Error method
will be used to convert the object to a string, which will then
- be formatted as required by the verb (if any). To avoid
- recursion in cases such as
+ be formatted as required by the verb (if any).
+
+ Finally, if an operand implements method String() string that method
+ will be used to convert the object to a string, which will then
+ be formatted as required by the verb (if any).
+ To avoid recursion in cases such as
type X int
func (x X) String() string { return Sprintf("%d", x) }
cast the value before recurring: