Files
opencloud/vendor/github.com/gookit/goutil/strutil/bytes.go
dependabot[bot] 5ebc596352 Bump github.com/gookit/config/v2 from 2.1.8 to 2.2.2
Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.1.8 to 2.2.2.
- [Release notes](https://github.com/gookit/config/releases)
- [Commits](https://github.com/gookit/config/compare/v2.1.8...v2.2.2)

---
updated-dependencies:
- dependency-name: github.com/gookit/config/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 10:54:58 +02:00

29 lines
560 B
Go

package strutil
import (
"github.com/gookit/goutil/byteutil"
)
// Buffer wrap and extends the bytes.Buffer
type Buffer = byteutil.Buffer
// NewBuffer instance
func NewBuffer() *Buffer {
return &Buffer{}
}
// ByteChanPool struct
//
// Usage:
//
// bp := strutil.NewByteChanPool(500, 1024, 1024)
// buf:=bp.Get()
// defer bp.Put(buf)
// // use buf do something ...
type ByteChanPool = byteutil.ChanPool
// NewByteChanPool instance
func NewByteChanPool(maxSize, width, capWidth int) *ByteChanPool {
return byteutil.NewChanPool(maxSize, width, capWidth)
}