]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1] doc/effective_go.html: Add missing '...' for fmt.Sprintf()
authorAaron Kemp <kemp.aaron@gmail.com>
Sat, 31 Mar 2012 00:51:24 +0000 (17:51 -0700)
committerRobert Griesemer <gri@golang.org>
Sat, 31 Mar 2012 00:51:24 +0000 (17:51 -0700)
««« backport 8434de733c20
doc/effective_go.html: Add missing '...' for fmt.Sprintf()

The '...' was missing on a call to fmt.Sprintf() which would result in
the slice being printed instead of the correct result.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5967051

»»»

doc/effective_go.html

index ed777f4bb82be5af57ce121ec422979380a43654..4382729c3c16bd3cc3d09d3a80691cd695577d00 100644 (file)
@@ -2291,7 +2291,7 @@ This would be useful if we wanted to refine the methods of <code>Logger</code>.
 </p>
 <pre>
 func (job *Job) Logf(format string, args ...interface{}) {
-    job.Logger.Logf("%q: %s", job.Command, fmt.Sprintf(format, args))
+    job.Logger.Logf("%q: %s", job.Command, fmt.Sprintf(format, args...))
 }
 </pre>
 <p>