mirror of
https://github.com/golang/go
synced 2024-11-21 12:34:38 -07:00
Effective Go: supplied missing type in variadic function example.
R=golang-dev, nigeltao CC=golang-dev https://golang.org/cl/4595055
This commit is contained in:
parent
5d6f118f23
commit
6be0bdf7bc
@ -2245,7 +2245,7 @@ we would write <code>job.Logger</code>.
|
|||||||
This would be useful if we wanted to refine the methods of <code>Logger</code>.
|
This would be useful if we wanted to refine the methods of <code>Logger</code>.
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
func (job *Job) Logf(format string, args ...) {
|
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>
|
</pre>
|
||||||
|
Loading…
Reference in New Issue
Block a user