ioutil

package
v0.0.0-...-4845449 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	Reader *bufio.Reader
	Buffer *bytes.Buffer
}

Reader is a simple buffer reader for testing. It implements these interfaces: - io.Reader - io.ReadCloser - io.Closer - terminal.FileReader.

func NewBufferedReader

func NewBufferedReader() *Reader

func (*Reader) Close

func (*Reader) Close() error

func (*Reader) Fd

func (*Reader) Fd() uintptr

Fd fake terminal file descriptor.

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

type Writer

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

Writer is a simple buffer writer for testing. It implements these interfaces: - io.Writer - io.WriteCloser - io.Closer - terminal.FileWriter.

func NewBufferedWriter

func NewBufferedWriter() *Writer

func (*Writer) Close

func (w *Writer) Close() error

func (*Writer) ConnectTo

func (w *Writer) ConnectTo(writer io.Writer)

ConnectTo allows write to multiple targets.

func (*Writer) Fd

func (*Writer) Fd() uintptr

Fd fake terminal file descriptor.

func (*Writer) Flush

func (w *Writer) Flush() (err error)

func (*Writer) String

func (w *Writer) String() string

func (*Writer) Truncate

func (w *Writer) Truncate()

func (*Writer) Write

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

func (*Writer) WriteString

func (w *Writer) WriteString(s string) (n int, err error)

Jump to

Keyboard shortcuts

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