It is errNoSuchWatch not errNoSuchPoller in filenotify/poller.go

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 989e791a42e9dedf7a39b17a877e08caa3a52866
Component: engine
This commit is contained in:
lixiaobing10051267
2016-12-26 16:19:50 +08:00
parent 7cf6d504ef
commit 38b6400e4a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -15,8 +15,8 @@ import (
var (
// errPollerClosed is returned when the poller is closed
errPollerClosed = errors.New("poller is closed")
// errNoSuchPoller is returned when trying to remove a watch that doesn't exist
errNoSuchWatch = errors.New("poller does not exist")
// errNoSuchWatch is returned when trying to remove a watch that doesn't exist
errNoSuchWatch = errors.New("watch does not exist")
)
// watchWaitTime is the time to wait between file poll loops
@@ -108,7 +108,7 @@ func assertEvent(w FileWatcher, eType fsnotify.Op) error {
select {
case e := <-w.Events():
if e.Op != eType {
err = fmt.Errorf("got wrong event type, expected %q: %v", eType, e)
err = fmt.Errorf("got wrong event type, expected %q: %v", eType, e.Op)
}
case e := <-w.Errors():
err = fmt.Errorf("got unexpected error waiting for events %v: %v", eType, e)