WriteString writes a string to the Buffer. Error returned is always nil, function signature is compatible with bytes.Buffer and bufio.Writer
(s string)
| 125 | // Error returned is always nil, function signature is compatible |
| 126 | // with bytes.Buffer and bufio.Writer |
| 127 | func (b *Buffer) WriteString(s string) (int, error) { |
| 128 | b.AppendString(s) |
| 129 | return len(s), nil |
| 130 | } |
| 131 | |
| 132 | // TrimNewline trims any final "\n" byte from the end of the buffer. |
| 133 | func (b *Buffer) TrimNewline() { |