diff options
author | Valery Piashchynski <[email protected]> | 2020-02-17 19:16:33 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-02-17 19:16:33 +0300 |
commit | 6fb73b5fcca8d40f5fb3789875480f1e8151db6a (patch) | |
tree | a39615a0a78fecb67a2bbac4c32122fee59dc689 | |
parent | 50b46c8d3c0e1f13623e2cd7cbb1302ae66ed308 (diff) |
Remove unused errors
Put reload service import in proper place
-rw-r--r-- | cmd/rr/main.go | 2 | ||||
-rw-r--r-- | service/reload/watcher.go | 21 |
2 files changed, 3 insertions, 20 deletions
diff --git a/cmd/rr/main.go b/cmd/rr/main.go index 46431e49..54a1f060 100644 --- a/cmd/rr/main.go +++ b/cmd/rr/main.go @@ -24,7 +24,6 @@ package main import ( rr "github.com/spiral/roadrunner/cmd/rr/cmd" - "github.com/spiral/roadrunner/service/reload" // services (plugins) "github.com/spiral/roadrunner/service/env" @@ -34,6 +33,7 @@ import ( "github.com/spiral/roadrunner/service/http" "github.com/spiral/roadrunner/service/limit" "github.com/spiral/roadrunner/service/metrics" + "github.com/spiral/roadrunner/service/reload" "github.com/spiral/roadrunner/service/rpc" "github.com/spiral/roadrunner/service/static" 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 } } |