NopWatcher doesn't implement Err method of Watcher interface
walez opened this issue · comments
Wale commented
version: 0.4.0
Registering any loader that does not watch i.e internal uses the NopWatcher e.g FlagWatcher causes a panic.
runtime error: invalid memory address or nil pointer dereference
Traced the panic to loader.go
case <-wl.Done():
if err := wl.Err(); err != nil {
c.cfg.Logger.Get().Error(err.Error())
}
// the watcher is closed
return
After the watchLoader which would have a NopWatcher as it's watcher returns a closed channel in wl.Done() the block tries to get any errors in the wl which causes a panic.
Mikael Knutsson commented
Thanks! Will address ASAP