iocloser

package
v1.12.4 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadCloser

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

ReadCloser wraps a writer to make a ReadCloser.

func NewReadCloser

func NewReadCloser(rd io.Reader, close func() error) *ReadCloser

NewReadCloser builds a new write closer

func (*ReadCloser) Close

func (w *ReadCloser) Close() error

Close closes the ReadCloser.

func (*ReadCloser) Read

func (w *ReadCloser) Read(p []byte) (n int, err error)

Read writes data to the io.Readr.

type WriteCloser

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

WriteCloser wraps a writer to make a WriteCloser.

func NewWriteCloser

func NewWriteCloser(wr io.Writer, close func() error) *WriteCloser

NewWriteCloser builds a new write closer

func (*WriteCloser) Close

func (w *WriteCloser) Close() error

Close closes the WriteCloser.

func (*WriteCloser) Write

func (w *WriteCloser) Write(p []byte) (n int, err error)

Write writes data to the io.Writer.

Jump to

Keyboard shortcuts

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