update comments

This commit is contained in:
Chakib Ben Ziane 2017-11-20 16:10:11 +01:00
parent 9b89735265
commit bd2fe2fc9d
2 changed files with 8 additions and 8 deletions

View File

@ -24,14 +24,6 @@ var Chrome = struct {
"/home/spike/.config/google-chrome/Default/",
}
type IWatchable interface {
Watch() bool
Watcher() *fsnotify.Watcher // returns browser watcher
Parse() // Main parsing method
GetPath() string //returns bookmark path
GetDir() string // returns bookmarks dir
}
type IBrowser interface {
SetupWatcher() // Starts watching bookmarks and runs Load on change
Watch() bool

View File

@ -4,6 +4,14 @@ import (
"github.com/fsnotify/fsnotify"
)
type IWatchable interface {
Watch() bool
Watcher() *fsnotify.Watcher // returns linked watcher
Parse() // Main parsing method
GetPath() string // returns watched path
GetDir() string // returns watched dir
}
func WatcherThread(w IWatchable) {
bookmarkPath := w.GetPath()