Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyBuffer ¶
CopyBuffer copies from src to dst through the provided buffer until either EOF is reached on src, or an error occurs. The copied content is verified against the size and the digest.
func UnwrapNopCloser ¶
UnwrapNopCloser unwraps the reader wrapped by `io.NopCloser()`. Similar implementation can be found in the built-in package `net/http`. Reference: https://github.com/golang/go/blob/go1.17.6/src/net/http/transfer.go#L423-L425
Types ¶
type CloserFunc ¶
type CloserFunc func() error
CloserFunc is the basic Close method defined in io.Closer.
func (CloserFunc) Close ¶
func (fn CloserFunc) Close() error
Close performs close operation by the CloserFunc.
Click to show internal directories.
Click to hide internal directories.