Documentation ¶
Overview ¶
Package search provides functions for searching content for a given string.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts ...option) (search, error)
New creates a searcher with optional input and output. It uses stdout and stdin as default values for input and output. It returns an error if one of the provided options errors.
func Search ¶
func Search(term string)
Search uses defult searcher for searching lines that contain the given string. Default searcher uses stdin and stdout for input and output. Search panics if the searcher with default settings returns an error.
func WithInput ¶
WithInput sets input source for the searcher. It errors when the provided input is nil.
func WithOutput ¶
WithOutput sets output for the searcher. It errors when the provided output is nil.
Types ¶
This section is empty.