mirror of
https://github.com/yusing/godoxy.git
synced 2026-02-18 23:07:44 +01:00
19 lines
319 B
Go
19 lines
319 B
Go
package watcher
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type fileWatcher struct {
|
|
relPath string
|
|
eventCh chan Event
|
|
errCh chan error
|
|
}
|
|
|
|
var _ Watcher = (*fileWatcher)(nil)
|
|
|
|
// Events implements the Watcher interface.
|
|
func (fw *fileWatcher) Events(ctx context.Context) (<-chan Event, <-chan error) {
|
|
return fw.eventCh, fw.errCh
|
|
}
|