testutil

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestWriter

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

TestWriter chains to another io.Writer and replaces certain characters as they pass through it for writing.

func NewTestWriter

func NewTestWriter(w io.Writer) *TestWriter

NewTestWriter returns a new io.Writer which translates spaces into underscores and adornes new lines with a down-leftwards pointing arrow, and finally writing the result to a chained io.Writer.

func (*TestWriter) Write

func (nl *TestWriter) Write(p []byte) (n int, err error)

Write replaces all spaces (0x20) with “␣” (&blanks;) and adorns all new lines \n with a “downwards arrow with corner leftwards” before writing the outcome to the chained writer.

Jump to

Keyboard shortcuts

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