remove Buffer.Append method

This commit is contained in:
Darien Raymond
2018-04-19 22:56:55 +02:00
parent 1ad429d1d4
commit 1425fd2ba9
17 changed files with 28 additions and 35 deletions

View File

@@ -36,15 +36,8 @@ func (b *Buffer) Clear() {
}
// AppendBytes appends one or more bytes to the end of the buffer.
func (b *Buffer) AppendBytes(bytes ...byte) int {
return b.Append(bytes)
}
// Append appends a byte array to the end of the buffer.
func (b *Buffer) Append(data []byte) int {
nBytes := copy(b.v[b.end:], data)
b.end += int32(nBytes)
return nBytes
func (b *Buffer) AppendBytes(bytes ...byte) (int, error) {
return b.Write(bytes)
}
// AppendSupplier appends the content of a BytesWriter to the buffer.