testutils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetStdout

func SetStdout(t *testing.T) *os.File

SetStdout is a helper function that stores the originl os.Stdout, replaces it with a temporary file, and restores the original os.Stdout after the test finishes. It returns the temporary file.

Types

type EmptyReader

type EmptyReader struct{}

EmptyReader is a mock reader that simulates an empty input.

func (*EmptyReader) Read

func (e *EmptyReader) Read(p []byte) (n int, err error)

type ErrorReader

type ErrorReader struct{}

ErrorReader is a mock reader that simulates an error when reading.

func (*ErrorReader) Read

func (e *ErrorReader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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