1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:14:41 -07:00

testing: compare Log to Println

Log always adds spaces between operands, like Println but unlike Print

R=golang-dev
CC=golang-dev
https://golang.org/cl/5504069
This commit is contained in:
Robert Hencke 2011-12-22 10:05:51 -08:00 committed by Rob Pike
parent 86deacc0bc
commit b5216e2e55

View File

@ -147,7 +147,7 @@ func (c *common) log(s string) {
c.output = append(c.output, decorate(s, true)...) c.output = append(c.output, decorate(s, true)...)
} }
// Log formats its arguments using default formatting, analogous to Print(), // Log formats its arguments using default formatting, analogous to Println(),
// and records the text in the error log. // and records the text in the error log.
func (c *common) Log(args ...interface{}) { c.log(fmt.Sprintln(args...)) } func (c *common) Log(args ...interface{}) { c.log(fmt.Sprintln(args...)) }