Documentation ¶
Index ¶
- Variables
- func WithContext(ctx context.Context, p Printer) context.Context
- type InputOutput
- type OsInOut
- type Printer
- type TestOutputs
- type TestPrinter
- func (p TestPrinter) Outputs() TestOutputs
- func (p TestPrinter) Print(i ...any)
- func (p TestPrinter) PrintErr(i ...any)
- func (p TestPrinter) PrintErrf(format string, i ...any)
- func (p TestPrinter) PrintErrln(i ...any)
- func (p TestPrinter) Printf(format string, i ...any)
- func (p TestPrinter) Println(i ...any)
Constants ¶
This section is empty.
Variables ¶
View Source
var OsPrinter = stdPrinter{OsInOut{}} //nolint:gochecknoglobals
Functions ¶
Types ¶
type InputOutput ¶
type Printer ¶
type Printer interface { Print(i ...any) Println(i ...any) Printf(format string, i ...any) PrintErr(i ...any) PrintErrln(i ...any) PrintErrf(format string, i ...any) InputOutput }
func PrinterFrom ¶
type TestOutputs ¶
func (TestOutputs) ErrOrStderr ¶
func (t TestOutputs) ErrOrStderr() io.Writer
func (TestOutputs) OutOrStdout ¶
func (t TestOutputs) OutOrStdout() io.Writer
type TestPrinter ¶
type TestPrinter struct {
// contains filtered or unexported fields
}
func NewTestPrinter ¶
func NewTestPrinter() TestPrinter
func NewTestPrinterWithAnswers ¶
func NewTestPrinterWithAnswers(answers []string) TestPrinter
func NewTestPrinterWithInput ¶
func NewTestPrinterWithInput(input io.Reader) TestPrinter
func (TestPrinter) Outputs ¶
func (p TestPrinter) Outputs() TestOutputs
func (TestPrinter) PrintErrln ¶
func (p TestPrinter) PrintErrln(i ...any)
Click to show internal directories.
Click to hide internal directories.