finder

package
v0.0.0-...-cae3db3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finder

type Finder struct {
	RootDir string
	Markers map[string]struct{}
	ResCh   chan string
	Group   *errgroup.Group
}

Finder is a struct that contains the root directory to start the search from, the markers to search for, the result channel to send the results to, and the errgroup to manage the goroutines.

func New

func New(rootDir string, markers []string, resCh chan string, g *errgroup.Group) *Finder

New creates a new Finder struct with the given root directory, markers, result

func (Finder) Find

func (pf Finder) Find(name string) error

Find starts the search from the root directory and sends the results to the result channel.

Jump to

Keyboard shortcuts

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