Investigate unused
linter report with field-writes-are-uses
setting disabled #1111
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1111
Loading…
Reference in a new issue
No description provided.
Delete branch "elebedeva/frostfs-node:fix/unused-linter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Close #1100
The investigation revealed several cases of false-positive results:
Therefore leaving
field-writes-are-uses
enabled as it is by default.Removed unnecessary unused fields.
@ -70,3 +70,3 @@
// internal variables
key *keys.PrivateKey
pubKey []byte
pubKey *keys.PublicKey
Frankly, I would remove it completely, there is no need to cache it, getting public key from the private is free, no calculations required https://pkg.go.dev/crypto/ecdsa#PrivateKey
even more so, we now have 2 different sources for public key, which can diverge in future
raw bytes made sense, when it was marshaled a lot, to reduce allocations
e17fc60c13
toe07869a8cf