termio

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(logPath string, printOutput bool) (func() error, error)

Configure creates a terminal log at logPath and routes command output to it.

func LogPrintf

func LogPrintf(format string, args ...any)

LogPrintf writes formatted output only to the terminal log sink.

func Print

func Print(content string)

Print writes command output to the configured terminal sink.

func Printf

func Printf(format string, args ...any)

Printf writes formatted command output to the configured terminal sink.

func SetOutputForTest

func SetOutputForTest(out Output) func()

SetOutputForTest replaces the package output sink and returns a restore function.

func ShouldConfigure

func ShouldConfigure(terminalLog string, printOutput, checkDocs bool, checkEfficiencyCount, compareTraceCount int) bool

ShouldConfigure reports whether command output should be routed to a log file.

Types

type Output

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

Output mirrors command progress to an optional log file and stdout.

func NewOutput

func NewOutput(file io.Writer, echo bool) Output

NewOutput creates an output sink for tests or custom terminal routing.

func (Output) Write

func (out Output) Write(p []byte) (int, error)

Write writes p to the configured file sink and optionally to stdout.

Jump to

Keyboard shortcuts

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