writer

package
v0.0.0-...-c6fe939 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdWriter

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

CmdWriter represents a writer to log an output from the executed cmd.

func NewCmd

func NewCmd(name string, file *os.File) *CmdWriter

NewCmd instantiates and returns a new cmd writer.

func (*CmdWriter) Flush

func (w *CmdWriter) Flush() error

Flush writes any buffered data to the underlying io.Writer.

func (*CmdWriter) MaxTokenSize

func (w *CmdWriter) MaxTokenSize(numBytes int)

MaxTokenSize sets the max token size for the underlying scanner.

func (*CmdWriter) Proxy

func (w *CmdWriter) Proxy(f *os.File)

Proxy will forward the output from the provided os.File through the writer.

type PrettyWriter

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

PrettyWriter represents a pretty formatteed writer

func NewPretty

func NewPretty(name string, file *os.File) *PrettyWriter

NewPretty instantiates and returns a new pretty writer.

func (*PrettyWriter) Write

func (w *PrettyWriter) Write(p []byte) (int, error)

Write implements the standard Write interface.

func (*PrettyWriter) WriteAndFlagToReplace

func (w *PrettyWriter) WriteAndFlagToReplace(p []byte) (int, error)

Write implements the standard Write interface.

func (*PrettyWriter) WriteStringf

func (w *PrettyWriter) WriteStringf(format string, args ...interface{})

WriteStringf writes the provided formatted string to the underlying interface.

Jump to

Keyboard shortcuts

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