shithub: furgit

ref: 79c40dcb08f0d512bd6d75d5e2acd3ddceec4530
dir: /internal/bufpool/from_owned.go/

View raw version
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}
}