mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-28 14:16:01 -04:00
Merge pull request #1124 from gucio321/golangci-lint-update
all: fix lint errors
This commit is contained in:
commit
a688d660a0
@ -32,6 +32,8 @@ linters-settings:
|
|||||||
# to possibly non-intuitive layout of struct fields (harder to read). Disable
|
# to possibly non-intuitive layout of struct fields (harder to read). Disable
|
||||||
# `fieldalignment` check here until we evaluate if it is worthwhile.
|
# `fieldalignment` check here until we evaluate if it is worthwhile.
|
||||||
- fieldalignment
|
- fieldalignment
|
||||||
|
# https://github.com/golangci/golangci-lint/issues/1973
|
||||||
|
- sigchanyzer
|
||||||
lll:
|
lll:
|
||||||
line-length: 140
|
line-length: 140
|
||||||
misspell:
|
misspell:
|
||||||
@ -68,7 +70,6 @@ linters:
|
|||||||
- nakedret
|
- nakedret
|
||||||
- prealloc
|
- prealloc
|
||||||
- rowserrcheck
|
- rowserrcheck
|
||||||
- scopelint
|
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- structcheck
|
- structcheck
|
||||||
- stylecheck
|
- stylecheck
|
||||||
|
@ -228,8 +228,7 @@ func (l *ds1Layers) insert(t LayerGroupType, idx int, newLayer *Layer) {
|
|||||||
// idx=1
|
// idx=1
|
||||||
// newLayer=c
|
// newLayer=c
|
||||||
// existing layerGroup is [a, b]
|
// existing layerGroup is [a, b]
|
||||||
newGroup := append((*group)[:idx], append([]*Layer{newLayer}, (*group)[idx:]...)...)
|
*group = append((*group)[:idx], append([]*Layer{newLayer}, (*group)[idx:]...)...)
|
||||||
*group = newGroup
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *ds1Layers) delete(t LayerGroupType, idx int) {
|
func (l *ds1Layers) delete(t LayerGroupType, idx int) {
|
||||||
|
@ -84,6 +84,8 @@ func setItemLoader(r *RecordManager, d *d2txt.DataDictionary) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
record.Properties = props
|
record.Properties = props
|
||||||
|
record.SetPropertiesLevel1 = bonus1
|
||||||
|
record.SetPropertiesLevel2 = bonus2
|
||||||
|
|
||||||
records[record.SetItemKey] = record
|
records[record.SetItemKey] = record
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ func NewPartyPanel(asset *d2asset.AssetManager,
|
|||||||
}
|
}
|
||||||
|
|
||||||
pp.partyIndexes = partyIndexes
|
pp.partyIndexes = partyIndexes
|
||||||
|
pp.indexes = indexes
|
||||||
|
|
||||||
pp.Logger = d2util.NewLogger()
|
pp.Logger = d2util.NewLogger()
|
||||||
pp.Logger.SetLevel(l)
|
pp.Logger.SetLevel(l)
|
||||||
@ -231,7 +232,7 @@ func (pi *partyIndex) setNameTooltipText() {
|
|||||||
|
|
||||||
// setColor sets appropriate labels' colors
|
// setColor sets appropriate labels' colors
|
||||||
func (pi *partyIndex) setColor(relations d2enum.PlayersRelationships) {
|
func (pi *partyIndex) setColor(relations d2enum.PlayersRelationships) {
|
||||||
var color = d2util.Color(white)
|
color := d2util.Color(white)
|
||||||
|
|
||||||
switch relations {
|
switch relations {
|
||||||
case d2enum.PlayerRelationEnemy:
|
case d2enum.PlayerRelationEnemy:
|
||||||
|
Loading…
Reference in New Issue
Block a user