diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-11-16 20:38:26 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-11-18 08:36:19 +1100 |
commit | 682db77401e5c44de1eeeb179afd0114bfe82f72 (patch) | |
tree | 1dbdadd56b6e893550565da86fe37cb0a40be30d /pkg/gui/file_watching.go | |
parent | 6faed08d9de2841788b1eac4077862bc4ae682f1 (diff) |
fix lint errors
Diffstat (limited to 'pkg/gui/file_watching.go')
-rw-r--r-- | pkg/gui/file_watching.go | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/pkg/gui/file_watching.go b/pkg/gui/file_watching.go index 41f1ff837..f7617e559 100644 --- a/pkg/gui/file_watching.go +++ b/pkg/gui/file_watching.go @@ -28,21 +28,6 @@ func NewFileWatcher(log *logrus.Entry) *fileWatcher { return &fileWatcher{ Disabled: true, } - - watcher, err := fsnotify.NewWatcher() - - if err != nil { - log.Error(err) - return &fileWatcher{ - Disabled: true, - } - } - - return &fileWatcher{ - Watcher: watcher, - Log: log, - WatchedFilenames: make([]string, 0, MAX_WATCHED_FILES), - } } func (w *fileWatcher) watchingFilename(filename string) bool { @@ -132,7 +117,7 @@ func (gui *Gui) watchFilesForChanges() { } // only refresh if we're not already if !gui.State.IsRefreshingFiles { - gui.refreshSidePanels(refreshOptions{mode: ASYNC, scope: []int{FILES}}) + _ = gui.refreshSidePanels(refreshOptions{mode: ASYNC, scope: []int{FILES}}) } // watch for errors |