5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-24 21:51:35 +00:00

Silence incorrect linter warning

This commit is contained in:
Neil Alexander 2022-07-07 18:19:15 +01:00
parent e4ec277683
commit 8c454a146c
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -108,7 +108,7 @@ func SubnetForKey(publicKey ed25519.PublicKey) *Subnet {
}
var snet Subnet
copy(snet[:], addr[:])
prefix := GetPrefix()
prefix := GetPrefix() // nolint:staticcheck
snet[len(prefix)-1] |= 0x01
return &snet
}
@ -117,7 +117,7 @@ func SubnetForKey(publicKey ed25519.PublicKey) *Subnet {
// This is used for key lookup.
func (a *Address) GetKey() ed25519.PublicKey {
var key [ed25519.PublicKeySize]byte
prefix := GetPrefix()
prefix := GetPrefix() // nolint:staticcheck
ones := int(a[len(prefix)])
for idx := 0; idx < ones; idx++ {
key[idx/8] |= 0x80 >> byte(idx%8)