var for less brackets
This commit is contained in:
parent
fd280ba2e8
commit
df7751c5d9
|
@ -29,17 +29,19 @@ type Modlist struct {
|
||||||
|
|
||||||
func (modlist *Modlist) setModStatus(name string, status bool) {
|
func (modlist *Modlist) setModStatus(name string, status bool) {
|
||||||
for i := range modlist.Mods {
|
for i := range modlist.Mods {
|
||||||
if modlist.Mods[i].Name == name && modlist.Mods[i].Enabled != status {
|
mod := &modlist.Mods[i]
|
||||||
modlist.Mods[i].Enabled = status
|
if mod.Name == name && mod.Enabled != status {
|
||||||
log.Debugf("Setting status of mod %s to %v", modlist.Mods[i].Name, modlist.Mods[i].Enabled)
|
mod.Enabled = status
|
||||||
|
log.Debugf("Setting status of mod %s to %v", mod.Name, mod.Enabled)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (modlist *Modlist) setAllStatus(status bool) {
|
func (modlist *Modlist) setAllStatus(status bool) {
|
||||||
for i := range modlist.Mods {
|
for i := range modlist.Mods {
|
||||||
modlist.Mods[i].Enabled = status
|
mod := &modlist.Mods[i]
|
||||||
log.Debugf("Setting status of mod %s to %v", modlist.Mods[i].Name, modlist.Mods[i].Enabled)
|
mod.Enabled = status
|
||||||
|
log.Debugf("Setting status of mod %s to %v", mod.Name, mod.Enabled)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue