mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-16 00:23:38 +01:00
18 lines
291 B
Go
18 lines
291 B
Go
package watcher
|
|
|
|
import (
|
|
"context"
|
|
|
|
gperr "github.com/yusing/goutils/errs"
|
|
)
|
|
|
|
type fileWatcher struct {
|
|
relPath string
|
|
eventCh chan Event
|
|
errCh chan gperr.Error
|
|
}
|
|
|
|
func (fw *fileWatcher) Events(ctx context.Context) (<-chan Event, <-chan gperr.Error) {
|
|
return fw.eventCh, fw.errCh
|
|
}
|