mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-08-16 22:20:30 +03:00
all: imp code
This commit is contained in:
parent
e033558d70
commit
c545152fa1
@ -161,7 +161,8 @@ func (hc *HostsContainer) handleEvents() {
|
||||
|
||||
defer close(hc.updates)
|
||||
|
||||
ok, eventsCh := true, hc.watcher.Events()
|
||||
eventsCh := hc.watcher.Events()
|
||||
ok := eventsCh != nil
|
||||
for ok {
|
||||
select {
|
||||
case _, ok = <-eventsCh:
|
||||
|
@ -168,22 +168,26 @@ type EmptyFSWatcher struct{}
|
||||
// type check
|
||||
var _ FSWatcher = EmptyFSWatcher{}
|
||||
|
||||
// Start implements the [FSWatcher] interface for EmptyFSWatcher.
|
||||
// Start implements the [FSWatcher] interface for EmptyFSWatcher. It always
|
||||
// returns nil error.
|
||||
func (EmptyFSWatcher) Start() (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close implements the [FSWatcher] interface for EmptyFSWatcher.
|
||||
// Close implements the [FSWatcher] interface for EmptyFSWatcher. It always
|
||||
// returns nil error.
|
||||
func (EmptyFSWatcher) Close() (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Events implements the [FSWatcher] interface for EmptyFSWatcher.
|
||||
// Events implements the [FSWatcher] interface for EmptyFSWatcher. It always
|
||||
// returns nil channel.
|
||||
func (EmptyFSWatcher) Events() (e <-chan event) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Add implements the [FSWatcher] interface for EmptyFSWatcher.
|
||||
// Add implements the [FSWatcher] interface for EmptyFSWatcher. It always
|
||||
// returns nil error.
|
||||
func (EmptyFSWatcher) Add(_ string) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user