Files
Javad RajabzadehandGitHub 0f1ca03543 Bump minimum go version into 1.20 (#659)
* chore: update Go version to 1.20 and golangci-lint to v2.3.0 in Dockerfile and tests.yml

* fix: update golangci action version to latest

* chore: fix linter issues

* chore: update Go version in pre-release and tests configuration to 1.20

* chore: update dependency management in tests.yml to use go.mod

* chore: update dependency management in pre-release-tests.yml to use go.mod

* chore: simplify dependency retrieval in CI configuration

* chore: remove unnecessary flags in dependency retrieval for CI configurations

* chore: update Go version format in CI configuration files
2025-07-31 19:51:48 +02:00

22 lines
285 B
Go

package meilisearch
import (
"bytes"
"sync"
)
type pooledBuffer struct {
*bytes.Buffer
pool *sync.Pool
}
func (pb *pooledBuffer) Read(p []byte) (int, error) {
return pb.Buffer.Read(p)
}
func (pb *pooledBuffer) Close() error {
pb.Reset()
pb.pool.Put(pb.Buffer)
return nil
}