mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
12
vendor/github.com/go-sql-driver/mysql/buffer.go
generated
vendored
12
vendor/github.com/go-sql-driver/mysql/buffer.go
generated
vendored
@ -130,18 +130,18 @@ func (b *buffer) takeBuffer(length int) []byte {
|
||||
// smaller than defaultBufSize
|
||||
// Only one buffer (total) can be used at a time.
|
||||
func (b *buffer) takeSmallBuffer(length int) []byte {
|
||||
if b.length == 0 {
|
||||
return b.buf[:length]
|
||||
if b.length > 0 {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
return b.buf[:length]
|
||||
}
|
||||
|
||||
// takeCompleteBuffer returns the complete existing buffer.
|
||||
// This can be used if the necessary buffer size is unknown.
|
||||
// Only one buffer (total) can be used at a time.
|
||||
func (b *buffer) takeCompleteBuffer() []byte {
|
||||
if b.length == 0 {
|
||||
return b.buf
|
||||
if b.length > 0 {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
return b.buf
|
||||
}
|
||||
|
Reference in New Issue
Block a user