iox

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StdinMark  = "-"
	StdoutMark = "-"
	FileMark   = "@"
)

Variables

View Source
var (
	ErrIO = errors.New("IO")
)

Functions

func AsWriteCloser

func AsWriteCloser(w io.Writer) io.WriteCloser

func NewWriteCloser

func NewWriteCloser(stdout io.Writer, file string) (io.WriteCloser, error)

func Open

func Open(file ...string) ([]*os.File, error)

func ReadFileOrLiteral

func ReadFileOrLiteral(s string) (string, error)

Types

type MultiReaderAndCloser

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

func NewMultiReaderAndCloser

func NewMultiReaderAndCloser(rs ...io.ReadCloser) *MultiReaderAndCloser

func (*MultiReaderAndCloser) Close

func (r *MultiReaderAndCloser) Close() error

func (*MultiReaderAndCloser) Reader

func (r *MultiReaderAndCloser) Reader() io.Reader

type ReaderAndCloser

type ReaderAndCloser interface {
	Reader() io.Reader
	Close() error
}

func AsReaderAndCloser

func AsReaderAndCloser(r io.Reader) ReaderAndCloser

func NewReaderAndCloser

func NewReaderAndCloser(stdin io.Reader, file ...string) (ReaderAndCloser, error)

type Walker

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

func NewWalker

func NewWalker(walker walk.Walker, root ...string) *Walker

func (*Walker) Err

func (w *Walker) Err() error

func (*Walker) Start

func (w *Walker) Start(ctx context.Context) <-chan walk.Entry

Jump to

Keyboard shortcuts

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