streams

package
v0.0.0-...-732dc05 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 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 In

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

In is an input stream to read user input. It implements io.ReadCloser.

func NewIn

func NewIn(in io.Reader) *In

NewIn returns a new In from an io.Reader.

func (*In) Close

func (i *In) Close() error

Close implements the io.Closer interface.

func (*In) IsTerminal

func (i *In) IsTerminal() bool

IsTerminal returns true if this stream is connected to a terminal.

func (*In) Read

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

Read implements the io.Reader interface.

type Out

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

Out is an output stream to write normal program output. It implements an io.WriteCloser.

func NewOut

func NewOut(out io.Writer) *Out

NewOut returns a new Out from an io.Writer.

func (*Out) Close

func (o *Out) Close() error

Close implements the io.Closer interface.

func (*Out) IsTerminal

func (o *Out) IsTerminal() bool

IsTerminal returns true if this stream is connected to a terminal.

func (*Out) Write

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

Write implements the io.Writer interface.

Jump to

Keyboard shortcuts

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