out should end in a newline. w.mu must be held.
(out []byte)
| 100 | // out should end in a newline. |
| 101 | // w.mu must be held. |
| 102 | func (w *logFileWriter) appendToFileLocked(out []byte) { |
| 103 | now := time.Now() |
| 104 | day := dayOf(now) |
| 105 | if w.fday != day { |
| 106 | w.startNewFileLocked() |
| 107 | } |
| 108 | out = removeDatePrefix(out) |
| 109 | if w.f != nil { |
| 110 | fmt.Fprintf(w.f, "%s: %s", |
| 111 | now.Format(tstime.DateTTimeMilliZ), |
| 112 | out) |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func isNum(b byte) bool { return '0' <= b && b <= '9' } |
| 117 |
no test coverage detected