mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 16:58:31 +02:00
refactor: minor styling fixes; deadcode cleanup and correct log level
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user