1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-09-01 08:54:20 -04:00

run goimports to format all Go source files of the project (#88)

Actual command run:
    find . -type f -name '*.go' | xargs -I '{}' goimports -w '{}'
This commit is contained in:
Robin Eklind 2019-11-05 19:46:52 -06:00 committed by Tim Sarbin
parent 4a24fc0b8c
commit ab7d19197e
4 changed files with 477 additions and 479 deletions

View File

@ -79,7 +79,7 @@ func LoadLevelPresets(fileProvider FileProvider) {
continue
}
props := strings.Split(line, "\t")
if(props[1] == "") {
if props[1] == "" {
continue // any line without a definition id is skipped (e.g. the "Expansion" line)
}
rec := createLevelPresetRecord(props)

View File

@ -319,7 +319,7 @@ func loadMissileCalc(r *[]string, inc func() int, params int) MissileCalc {
}
result.Params = make([]MissileCalcParam, params)
for p := 0; p < params; p++ {
result.Params[p] = loadMissileCalcParam(r, inc);
result.Params[p] = loadMissileCalcParam(r, inc)
}
return result
}

View File

@ -153,7 +153,6 @@ func createWeaponRecord(line string) WeaponRecord {
StrengthBonus: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
DexterityBonus: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
RequiredStrength: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
RequiredDexterity: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
Durability: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
@ -190,7 +189,6 @@ func createWeaponRecord(line string) WeaponRecord {
GemSockets: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
GemApplyType: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))),
SpecialFeature: r[inc()],
Useable: StringToInt(EmptyToZero(AsterToEmpty(r[inc()]))) == 1,
@ -261,7 +259,7 @@ func createWeaponVendorParams(r *[]string, inc func() int) map[string]*WeaponVen
MagicMax: StringToInt(EmptyToZero((*r)[inc()])),
MagicLevel: StringToUint8(EmptyToZero((*r)[inc()])),
}
result[name] = &wvp;
result[name] = &wvp
}
return result
}