summaryrefslogtreecommitdiff
path: root/service/reload/watcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/reload/watcher.go')
-rw-r--r--service/reload/watcher.go21
1 files changed, 2 insertions, 19 deletions
diff --git a/service/reload/watcher.go b/service/reload/watcher.go
index e81ce56f..f1cafc8a 100644
--- a/service/reload/watcher.go
+++ b/service/reload/watcher.go
@@ -53,24 +53,7 @@ var ops = map[Op]string{
Move: "MOVE",
}
-var (
- // ErrDurationTooShort occurs when calling the watcher's Start
- // method with a duration that's less than 1 nanosecond.
- ErrDurationTooShort = errors.New("error: duration is less than 1ns")
-
- // ErrWatcherRunning occurs when trying to call the watcher's
- // Start method and the polling cycle is still already running
- // from previously calling Start and not yet calling Close.
- ErrWatcherRunning = errors.New("error: watcher is already running")
-
- // ErrWatchedFileDeleted is an error that occurs when a file or folder that was
- // being watched has been deleted.
- ErrWatchedFileDeleted = errors.New("error: watched file or folder deleted")
-
- // ErrSkip is less of an error, but more of a way for path hooks to skip a file or
- // directory.
- ErrSkip = errors.New("error: skipping file")
-)
+var ErrorSkip = errors.New("file is skipped")
// FilterFileHookFunc is a function that is called to filter files during listings.
// If a file is ok to be listed, nil is returned otherwise ErrSkip is returned.
@@ -93,7 +76,7 @@ func RegexFilterHook(r *regexp.Regexp, useFullPath bool) FilterFileHookFunc {
}
// No match.
- return ErrSkip
+ return ErrorSkip
}
}