all: fix lint errors

This commit is contained in:
gucio321 2021-05-12 08:30:28 +02:00
parent 2f4663c680
commit c938b745a2
4 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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
} }

View File

@ -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: