Lines returns the current buffer contents, split on newlines.
()
| 85 | |
| 86 | // Lines returns the current buffer contents, split on newlines. |
| 87 | func (b *Buffer) Lines() []string { |
| 88 | output := strings.Split(b.String(), "\n") |
| 89 | return output[:len(output)-1] |
| 90 | } |
| 91 | |
| 92 | // Stripped returns the current buffer contents with the last trailing newline |
| 93 | // stripped. |