log generates the output.
(s string)
| 221 | |
| 222 | // log generates the output. |
| 223 | func (c *common) log(s string) { |
| 224 | // This doesn't print the same as in upstream go, but works for now. |
| 225 | if len(s) != 0 && s[len(s)-1] == '\n' { |
| 226 | s = s[:len(s)-1] |
| 227 | } |
| 228 | lines := strings.Split(s, "\n") |
| 229 | // First line. |
| 230 | fmt.Fprintf(c.output, "%s %s\n", c.indent, lines[0]) |
| 231 | // More lines. |
| 232 | for _, line := range lines[1:] { |
| 233 | fmt.Fprintf(c.output, "%s %s\n", c.indent, line) |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | // Log formats its arguments using default formatting, analogous to Println, |
| 238 | // and records the text in the error log. For tests, the text will be printed only if |
no outgoing calls
no test coverage detected