cio

package
v1.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 5 Imported by: 46

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Stdio = &struct {
	io.ReadCloser
	io.Writer
}{
	io.NopCloser(os.Stdin),
	os.Stdout,
}

Stdio as a ReadWriteCloser

Functions

func Pipe

func Pipe(src io.ReadWriteCloser, dst io.ReadWriteCloser) (int64, int64)

Pipe copies between src and dst in both directions, propagating half-closes: when one direction reaches a clean EOF, the write side of its destination is closed (CloseWrite) while the other direction keeps flowing. Copy errors tear down both ends. Both connections are fully closed before Pipe returns.

Types

type Logger

type Logger struct {
	Info, Debug bool
	// contains filtered or unexported fields
}

Logger is pkg/log Logger with prefixing and 2 log levels

func NewLogger

func NewLogger(prefix string) *Logger

func NewLoggerFlag

func NewLoggerFlag(prefix string, flag int) *Logger

func (*Logger) Debugf

func (l *Logger) Debugf(f string, args ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(f string, args ...interface{}) error

func (*Logger) Fork

func (l *Logger) Fork(prefix string, args ...interface{}) *Logger

func (*Logger) Infof

func (l *Logger) Infof(f string, args ...interface{})

func (*Logger) IsDebug

func (l *Logger) IsDebug() bool

func (*Logger) IsInfo

func (l *Logger) IsInfo() bool

func (*Logger) Prefix

func (l *Logger) Prefix() string

Jump to

Keyboard shortcuts

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