Source watcher ErrStoppedWatcher and fixed test

This commit is contained in:
Milos Gajdos
2019-08-20 22:32:47 +01:00
parent dfbd730b8c
commit 4ea27517b5
7 changed files with 37 additions and 19 deletions

View File

@@ -1,8 +1,6 @@
package env
import (
"errors"
"github.com/micro/go-micro/config/source"
)
@@ -13,7 +11,7 @@ type watcher struct {
func (w *watcher) Next() (*source.ChangeSet, error) {
<-w.exit
return nil, errors.New("watcher stopped")
return nil, source.ErrWatcherStopped
}
func (w *watcher) Stop() error {