streams

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// StdOut is the standard output stream.
	StdOut = NewOut(os.Stdout)
	// StdErr is the standard error stream.
	StdErr = NewOut(os.Stderr)
)
View Source
var StdIn = NewIn(os.Stdin, int(os.Stdin.Fd()))

Functions

This section is empty.

Types

type In

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

func NewIn

func NewIn(in io.ReadCloser, fd int) *In

func (*In) Close

func (i *In) Close() error

func (*In) IsTerminal

func (s *In) IsTerminal() bool

func (*In) MakeRaw

func (s *In) MakeRaw() error

func (*In) Read

func (i *In) Read(p []byte) (n int, err error)

func (*In) Restore

func (s *In) Restore() error

func (*In) Size

func (s *In) Size() (width int, height int, err error)

type Out

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

func NewOut

func NewOut(out io.Writer) *Out

func (*Out) IsTerminal

func (s *Out) IsTerminal() bool

func (*Out) MakeRaw

func (s *Out) MakeRaw() error

func (*Out) Restore

func (s *Out) Restore() error

func (*Out) SetOutput

func (o *Out) SetOutput(out io.Writer)

func (*Out) Size

func (s *Out) Size() (width int, height int, err error)

func (*Out) WithPrefix

func (o *Out) WithPrefix(prefix string) *Out

func (*Out) Write

func (o *Out) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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