iohelper

package
v0.15.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCloser

func ReadCloser(in ReaderAtCloser) io.ReadCloser

ReadCloser returns a ReadCloser from ReaderAtCloser.

func WithCloser added in v0.14.0

func WithCloser(r io.ReadCloser, closer func() error) io.ReadCloser

WithCloser returns a ReadCloser with additional closer function.

Types

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

func (*Counter) Size

func (c *Counter) Size() (n int64)

func (*Counter) Write

func (c *Counter) Write(p []byte) (n int, err error)

type NopWriteCloser

type NopWriteCloser struct {
	io.Writer
}

func (*NopWriteCloser) Close

func (w *NopWriteCloser) Close() error

type ReaderAtCloser added in v0.14.0

type ReaderAtCloser interface {
	io.ReaderAt
	io.Closer
	Size() int64
}

type WriteCloser

type WriteCloser struct {
	io.WriteCloser
	CloseFunc func() error
}

func (*WriteCloser) Close

func (wc *WriteCloser) Close() error

Jump to

Keyboard shortcuts

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