gosuki/main.go

28 lines
496 B
Go
Raw Normal View History

2017-10-20 10:51:56 +00:00
package main
const (
BOOKMARK_FILE = "Bookmarks"
BOOKMARK_DIR = "/home/spike/.config/google-chrome/Default/"
2017-10-20 10:51:56 +00:00
)
func main() {
// Block the main function
block := make(chan bool)
2017-11-19 16:00:37 +00:00
initMode()
initLogging()
// Initialize sqlite database available in global `cacheDB` variable
2017-11-17 14:18:53 +00:00
initDB()
chromeWatcher := &bookmarkWatcher{}
chromeWatcher.Init(BOOKMARK_DIR, BOOKMARK_FILE, Chrome)
2017-11-17 15:58:16 +00:00
chromeWatcher.Preload()
chromeWatcher.Start()
2017-10-20 10:51:56 +00:00
// Flush to disk for testing
//flushToDisk()
<-block
2017-10-20 10:51:56 +00:00
}