refactor: minor styling fixes; deadcode cleanup and correct log level

This commit is contained in:
yusing
2026-02-15 20:01:36 +08:00
parent 35b8a60edb
commit 154149b06d
29 changed files with 88 additions and 67 deletions

View File

@@ -61,6 +61,9 @@ func NewDirectoryWatcher(parent task.Parent, dirPath string) *DirWatcher {
return helper
}
var _ Watcher = (*DirWatcher)(nil)
// Events implements the Watcher interface.
func (h *DirWatcher) Events(_ context.Context) (<-chan Event, <-chan error) {
return h.eventCh, h.errCh
}
@@ -112,7 +115,7 @@ func (h *DirWatcher) start() {
relPath := strings.TrimPrefix(fsEvent.Name, h.dir)
relPath = strings.TrimPrefix(relPath, "/")
if len(relPath) > 0 && relPath[0] == '.' { // hideden file
if len(relPath) > 0 && relPath[0] == '.' { // hidden file
continue
}