iocopy

package
v0.10.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package iocopy is a wrapper around io.Copy() that recycles shared buffers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(dst io.Writer, src io.Reader) (int64, error)

Copy is equivalent to io.Copy().

func GetBuffer added in v0.9.0

func GetBuffer() []byte

GetBuffer allocates new temporary buffer suitable for copying data.

func JustCopy added in v0.9.0

func JustCopy(dst io.Writer, src io.Reader) error

JustCopy is just like Copy() but does not return the number of bytes.

func ReleaseBuffer added in v0.9.0

func ReleaseBuffer(b []byte)

ReleaseBuffer releases the buffer back to the pool.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL