blob: 65c5f47114f5b27843bfc23faf5dac656831ba89 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
|
package bufpool
// FromOwned constructs a Buffer from a caller-owned byte slice. The resulting
// Buffer does not participate in pooling and will never be returned to the
// internal pool when released.
func FromOwned(buf []byte) Buffer {
return Buffer{buf: buf, pool: unpooled}
}
|