Add walker options and replace 'find' with the built-in walker (#3649)

This commit is contained in:
Junegunn Choi
2024-03-13 20:56:31 +09:00
committed by GitHub
parent 6ce8d49d1b
commit d282a1649d
12 changed files with 230 additions and 98 deletions

View File

@@ -117,7 +117,7 @@ func Run(opts *Options, version string, revision string) {
reader = NewReader(func(data []byte) bool {
return chunkList.Push(data)
}, eventBox, opts.ReadZero, opts.Filter == nil)
go reader.ReadSource()
go reader.ReadSource(opts.WalkerRoot, opts.WalkerOpts, opts.WalkerSkip)
}
// Matcher
@@ -165,7 +165,7 @@ func Run(opts *Options, version string, revision string) {
}
return false
}, eventBox, opts.ReadZero, false)
reader.ReadSource()
reader.ReadSource(opts.WalkerRoot, opts.WalkerOpts, opts.WalkerSkip)
} else {
eventBox.Unwatch(EvtReadNew)
eventBox.WaitFor(EvtReadFin)