filter

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileFilter

type FileFilter struct {
	To *os.File

	Filter func([]byte) bool
	// contains filtered or unexported fields
}

FileFilter filter *os.File with a defined filter function.

func (*FileFilter) Close

func (f *FileFilter) Close()

Close should call end of the filter to stop background listen goroutine. Safe for calling more than once.

func (*FileFilter) Start

func (f *FileFilter) Start() (*os.File, error)

Start create a goroutine to listen->filter->redirect output. It is return *os.File to replace it with other *os.File types. Safe to call more than once to get filtered *os.File.

Jump to

Keyboard shortcuts

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