chore: comments, lint
This commit is contained in:
parent
953aef2854
commit
a3e1aae827
@ -55,6 +55,7 @@ var globalFirefoxFlags = []cli.Flag{
|
|||||||
|
|
||||||
// Firefox global flags must start with --firefox-<flag name here>
|
// Firefox global flags must start with --firefox-<flag name here>
|
||||||
// NOTE: is called in *cli.App.Before callback
|
// NOTE: is called in *cli.App.Before callback
|
||||||
|
//TODO: refactor module flags/options mangement to generate flags from config options
|
||||||
func globalCommandFlagsManager(c *cli.Context) error {
|
func globalCommandFlagsManager(c *cli.Context) error {
|
||||||
log.Debugf("<%s> registering global flag manager", BrowserName)
|
log.Debugf("<%s> registering global flag manager", BrowserName)
|
||||||
for _, f := range c.App.Flags {
|
for _, f := range c.App.Flags {
|
||||||
|
@ -113,7 +113,7 @@ func NewFirefoxConfig() *FirefoxConfig {
|
|||||||
Stats: &parsing.Stats{},
|
Stats: &parsing.Stats{},
|
||||||
UseFileWatcher: true,
|
UseFileWatcher: true,
|
||||||
// NOTE: see parsing.Hook to add custom parsing logic for each
|
// NOTE: see parsing.Hook to add custom parsing logic for each
|
||||||
// parsed node
|
// parsed bookmark node
|
||||||
UseHooks: []string{"notify-send"},
|
UseHooks: []string{"notify-send"},
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -151,8 +151,6 @@ func init() {
|
|||||||
FFConfig = NewFirefoxConfig()
|
FFConfig = NewFirefoxConfig()
|
||||||
config.RegisterConfigurator(BrowserName, config.AsConfigurator(FFConfig))
|
config.RegisterConfigurator(BrowserName, config.AsConfigurator(FFConfig))
|
||||||
|
|
||||||
// log.Debugf("%p", FFConfig)
|
|
||||||
|
|
||||||
// An example of running custom code when config is ready
|
// An example of running custom code when config is ready
|
||||||
// config.RegisterConfReadyHooks(func(c *cli.Context) error{
|
// config.RegisterConfReadyHooks(func(c *cli.Context) error{
|
||||||
// // log.Debugf("%#v", config.GetAll().Dump())
|
// // log.Debugf("%#v", config.GetAll().Dump())
|
||||||
|
@ -42,6 +42,7 @@ func cleanup(f func() error) {
|
|||||||
// Inserts or updates a bookmarks to the passed DB
|
// Inserts or updates a bookmarks to the passed DB
|
||||||
// In case of a conflict for a UNIQUE URL constraint,
|
// In case of a conflict for a UNIQUE URL constraint,
|
||||||
// update the existing bookmark
|
// update the existing bookmark
|
||||||
|
//TODO!: use context
|
||||||
func (db *DB) UpsertBookmark(bk *Bookmark) {
|
func (db *DB) UpsertBookmark(bk *Bookmark) {
|
||||||
|
|
||||||
var sqlite3Err sqlite3.Error
|
var sqlite3Err sqlite3.Error
|
||||||
@ -89,7 +90,6 @@ func (db *DB) UpsertBookmark(bk *Bookmark) {
|
|||||||
tags := NewTags(bk.Tags, TagSep).PreSanitize()
|
tags := NewTags(bk.Tags, TagSep).PreSanitize()
|
||||||
|
|
||||||
tagListText := tags.String(true)
|
tagListText := tags.String(true)
|
||||||
// log.Debugf("inserting tags %#v", tagListText)
|
|
||||||
|
|
||||||
// First try to insert the bookmark (assume it's new)
|
// First try to insert the bookmark (assume it's new)
|
||||||
// log.Debugf("INSERT INTO bookmarks(URL, metadata, tags, desc, flags) VALUES (%s, %s, %s, %s, %d)",
|
// log.Debugf("INSERT INTO bookmarks(URL, metadata, tags, desc, flags) VALUES (%s, %s, %s, %s, %d)",
|
||||||
|
@ -34,6 +34,7 @@ func Init() {
|
|||||||
initCache()
|
initCache()
|
||||||
StartSyncScheduler()
|
StartSyncScheduler()
|
||||||
|
|
||||||
|
|
||||||
// Check and initialize local db as last step
|
// Check and initialize local db as last step
|
||||||
// browser bookmarks should already be in cache
|
// browser bookmarks should already be in cache
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user