chore: comments + lint
Signed-off-by: blob42 <contact@blob42.xyz>
This commit is contained in:
parent
fbaab11bab
commit
1357e49cb2
@ -38,6 +38,7 @@ var fflog = logging.GetLogger("FF")
|
||||
var (
|
||||
ffUnlockVFSCmd = cli.Command{
|
||||
Name: "unlock",
|
||||
Usage: "Remove VFS lock from places.sqlite",
|
||||
Aliases: []string{"u"},
|
||||
Action: ffUnlockVFS,
|
||||
}
|
||||
@ -53,9 +54,9 @@ var (
|
||||
Usage: "VFS locking commands",
|
||||
Subcommands: []*cli.Command{
|
||||
&ffUnlockVFSCmd,
|
||||
&ffCheckVFSCmd,
|
||||
},
|
||||
}
|
||||
&ffCheckVFSCmd,
|
||||
},
|
||||
}
|
||||
|
||||
ffListProfilesCmd = cli.Command{
|
||||
Name: "list",
|
||||
@ -88,8 +89,8 @@ func init() {
|
||||
cmd.RegisterModCommand(BrowserName, FirefoxCmds)
|
||||
}
|
||||
|
||||
//TODO: #54 define interface for modules to handle and list profiles
|
||||
//FIX: Remove since profile listing is implemented at the main module level
|
||||
// TODO: #54 define interface for modules to handle and list profiles
|
||||
// FIX: Remove since profile listing is implemented at the main module level
|
||||
func ffListProfiles(_ *cli.Context) error {
|
||||
flavours := FirefoxProfileManager.ListFlavours()
|
||||
for _, f := range flavours {
|
||||
@ -106,7 +107,6 @@ func ffListProfiles(_ *cli.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,8 @@ func main() {
|
||||
app := cli.NewApp()
|
||||
|
||||
app.Name = "gosuki"
|
||||
app.Description = "TODO: summary gosuki description"
|
||||
app.Usage = "swiss-knife bookmark manager"
|
||||
app.Version = utils.Version()
|
||||
|
||||
flags := []cli.Flag{
|
||||
@ -58,7 +60,6 @@ func main() {
|
||||
Name: "config",
|
||||
Aliases: []string{"c"},
|
||||
Value: config.ConfigFile(),
|
||||
Usage: "load config from `FILE`",
|
||||
DefaultText: "~/.config/gosuki/config.toml",
|
||||
Category: "_",
|
||||
},
|
||||
|
@ -137,7 +137,7 @@ func GetModuleOption(module string, opt string) (interface{}, error) {
|
||||
|
||||
// Register a module option ie. under [module] in toml file
|
||||
// If the module is not a configurator, a simple map[string]interface{} will be
|
||||
// created for it.
|
||||
// created for it. use [GetModuleOption]
|
||||
func RegisterModuleOpt(module string, opt string, val interface{}) error {
|
||||
log.Debugf("Setting option for module <%s>: %s = %v", module, opt, val)
|
||||
if _, ok := configs[module]; !ok {
|
||||
|
@ -154,14 +154,14 @@ func RegisterModule(module Module) {
|
||||
//TODO: Register by ID
|
||||
registeredModules = append(registeredModules, module)
|
||||
|
||||
//WIP:
|
||||
switch module.(type) {
|
||||
case watch.IntervalFetcher:
|
||||
fmt.Println("this is interval fetcher")
|
||||
|
||||
case watch.WatchRunner:
|
||||
fmt.Println("this is watch runner")
|
||||
}
|
||||
//WIP: custom handling of watcher types
|
||||
// switch module.(type) {
|
||||
// case watch.IntervalFetcher:
|
||||
// fmt.Println("this is interval fetcher")
|
||||
//
|
||||
// case watch.WatchRunner:
|
||||
// fmt.Println("this is watch runner")
|
||||
// }
|
||||
}
|
||||
|
||||
// Returns a list of registerd browser modules
|
||||
|
Loading…
Reference in New Issue
Block a user