removed all 'structcheck' and 'unused' lint errors (#839)

This commit is contained in:
gravestench 2020-10-26 00:49:41 +00:00 committed by GitHub
parent 42a48fe03a
commit 49c1985dcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 2 deletions

View File

@ -425,6 +425,9 @@ func (am *AssetManager) loadDCC(path string,
}
animation, err := newDCCAnimation(dcc, palette, effect)
if err != nil {
return nil, err
}
return animation, nil
}

View File

@ -53,6 +53,7 @@ const (
var _ d2item.Item = &Item{}
// Item is a representation of a diablo2 item
// nolint:structcheck,unused // WIP
type Item struct {
factory *ItemFactory
name string
@ -83,6 +84,7 @@ type Item struct {
sockets []*d2item.Item // there will be checks for handling the craziness this might entail
}
// nolint:structcheck,unused // WIP
type itemAttributes struct {
worldSprite *d2ui.Sprite
inventorySprite *d2ui.Sprite
@ -118,7 +120,7 @@ type itemAttributes struct {
type minMaxEnhanceable struct {
min int
max int
enhance int
enhance int // nolint:structcheck,unused // WIP
}
// Label returns the item name

View File

@ -7,6 +7,7 @@ import (
)
// AnimatedEntity represents an animation that can be projected onto the map.
// nolint:structcheck,unused // variables are unused because it is incomplete
type AnimatedEntity struct {
mapEntity
animation d2interface.Animation

View File

@ -116,7 +116,7 @@ type MainMenu struct {
inputManager d2interface.InputManager
renderer d2interface.Renderer
audioProvider d2interface.AudioProvider
scriptEngine *d2script.ScriptEngine
scriptEngine *d2script.ScriptEngine // nolint:structcheck,unused // it will be used...
navigator d2interface.Navigator
uiManager *d2ui.UIManager
heroState *d2hero.HeroStateFactory

View File

@ -36,6 +36,7 @@ func Create(asset *d2asset.AssetManager) (*RemoteClientConnection, error) {
}
result := &RemoteClientConnection{
asset: asset,
heroState: heroStateFactory,
uniqueID: uuid.New().String(),
}
@ -149,6 +150,7 @@ func (r *RemoteClientConnection) serverListener() {
}
// bytesToJSON reads the packet type, decompresses the packet and returns a JSON string.
// nolint:unused // WIP
func (r *RemoteClientConnection) bytesToJSON(buffer []byte) (string, d2netpackettype.NetPacketType, error) {
packet, err := d2netpacket.UnmarshalNetPacket(buffer)
if err != nil {