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) {
|
||||
for i := range modlist.Mods {
|
||||
if modlist.Mods[i].Name == name && modlist.Mods[i].Enabled != status {
|
||||
modlist.Mods[i].Enabled = status
|
||||
log.Debugf("Setting status of mod %s to %v", modlist.Mods[i].Name, modlist.Mods[i].Enabled)
|
||||
mod := &modlist.Mods[i]
|
||||
if mod.Name == name && mod.Enabled != status {
|
||||
mod.Enabled = status
|
||||
log.Debugf("Setting status of mod %s to %v", mod.Name, mod.Enabled)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (modlist *Modlist) setAllStatus(status bool) {
|
||||
for i := range modlist.Mods {
|
||||
modlist.Mods[i].Enabled = status
|
||||
log.Debugf("Setting status of mod %s to %v", modlist.Mods[i].Name, modlist.Mods[i].Enabled)
|
||||
mod := &modlist.Mods[i]
|
||||
mod.Enabled = status
|
||||
log.Debugf("Setting status of mod %s to %v", mod.Name, mod.Enabled)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue