travis...

This commit is contained in:
Azareal 2020-02-05 13:02:07 +10:00
parent f858797835
commit 158b1de7bc
1 changed files with 6 additions and 6 deletions

View File

@ -25,9 +25,9 @@ type PluginList map[string]*Plugin
// TODO: Have a proper store rather than a map? // TODO: Have a proper store rather than a map?
var Plugins PluginList = make(map[string]*Plugin) var Plugins PluginList = make(map[string]*Plugin)
func (list PluginList) Add(plugin *Plugin) { func (list PluginList) Add(pl *Plugin) {
buildPlugin(plugin) buildPlugin(pl)
list[plugin.UName] = plugin list[pl.UName] = pl
} }
func buildPlugin(pl *Plugin) { func buildPlugin(pl *Plugin) {
@ -415,7 +415,7 @@ func InitExtend() (err error) {
} }
// Load polls the database to see which plugins have been activated and which have been installed // Load polls the database to see which plugins have been activated and which have been installed
func (plugins PluginList) Load() error { func (l PluginList) Load() error {
rows, err := extendStmts.getPlugins.Query() rows, err := extendStmts.getPlugins.Query()
if err != nil { if err != nil {
return err return err
@ -431,13 +431,13 @@ func (plugins PluginList) Load() error {
} }
// Was the plugin deleted at some point? // Was the plugin deleted at some point?
plugin, ok := plugins[uname] plugin, ok := l[uname]
if !ok { if !ok {
continue continue
} }
plugin.Active = active plugin.Active = active
plugin.Installed = installed plugin.Installed = installed
plugins[uname] = plugin l[uname] = plugin
} }
return rows.Err() return rows.Err()
} }