onNL returns true if Formatter is at the beginning of new line.
()
| 197 | |
| 198 | // onNL returns true if Formatter is at the beginning of new line. |
| 199 | func (f *Formatter) onNL() bool { |
| 200 | b := f.buf.Bytes() |
| 201 | return len(b) == 0 || b[len(b)-1] == '\n' |
| 202 | } |
| 203 | |
| 204 | // forceNL inserts newline character if Formatter is not at the. |
| 205 | // beginning of new line |
no test coverage detected