output

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConditionalWriter

type ConditionalWriter struct {
	Writer io.Writer
	// contains filtered or unexported fields
}

ConditionalWriter is an io.Writer that wraps an input writer and exposes methods to condition its action.

func (ConditionalWriter) ElseIf

ElseIf either keeps the previous write condition if it is true, else it sets it to v.

func (ConditionalWriter) If

If sets the write condition to v.

func (ConditionalWriter) Write

func (w ConditionalWriter) Write(b []byte) (int, error)

Write writes b only if ConditionalWriter.Mute is false, otherwise it is no-op.

Jump to

Keyboard shortcuts

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