Fix buffer usage

This commit is contained in:
世界 2022-05-07 17:08:57 +08:00
parent 6089c358c2
commit f1b87be6e4
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
21 changed files with 121 additions and 24 deletions

View file

@ -119,7 +119,7 @@ func (b *Buffer) ExtendHeader(size int) []byte {
}
}
func (b *Buffer) WriteBufferAtFirst(buffer *Buffer) *Buffer {
func (b *Buffer) _WriteBufferAtFirst(buffer *Buffer) *Buffer {
size := buffer.Len()
if b.start >= size {
n := copy(b.data[b.start-size:b.start], buffer.Bytes())
@ -140,7 +140,7 @@ func (b *Buffer) WriteBufferAtFirst(buffer *Buffer) *Buffer {
}
}
func (b *Buffer) WriteAtFirst(data []byte) (n int, err error) {
func (b *Buffer) _WriteAtFirst(data []byte) (n int, err error) {
size := len(data)
if b.start >= size {
n = copy(b.data[b.start-size:b.start], data)