mirror of
https://github.com/DominicBreuker/pspy.git
synced 2025-12-21 11:44:51 +00:00
add tests for fswatcher package
This commit is contained in:
committed by
Dominic Breuker
parent
94a12cf031
commit
1deb4838a5
@@ -7,9 +7,15 @@ import (
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type Walker struct{}
|
||||
|
||||
func NewWalker() *Walker {
|
||||
return &Walker{}
|
||||
}
|
||||
|
||||
const maxInt = int(^uint(0) >> 1)
|
||||
|
||||
func Walk(root string, depth int) (dirCh chan string, errCh chan error, doneCh chan struct{}) {
|
||||
func (w *Walker) Walk(root string, depth int) (dirCh chan string, errCh chan error, doneCh chan struct{}) {
|
||||
if depth < 0 {
|
||||
depth = maxInt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user