mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 07:05:06 +03:00
nolint SA6002
This commit is contained in:
parent
fb6b828916
commit
3ccbd4e0fc
3 changed files with 9 additions and 9 deletions
|
@ -236,7 +236,7 @@ func BoxOpen(shared *BoxSharedKey,
|
||||||
n := (*[BoxNonceLen]byte)(nonce)
|
n := (*[BoxNonceLen]byte)(nonce)
|
||||||
temp := append(pool.Get().([]byte), boxed...)
|
temp := append(pool.Get().([]byte), boxed...)
|
||||||
unboxed, success := box.OpenAfterPrecomputation(boxed[:0], temp, n, s)
|
unboxed, success := box.OpenAfterPrecomputation(boxed[:0], temp, n, s)
|
||||||
pool.Put(temp[:0])
|
pool.Put(temp[:0]) // nolint:staticcheck
|
||||||
return unboxed, success
|
return unboxed, success
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ func BoxSeal(shared *BoxSharedKey, unboxed []byte, nonce *BoxNonce) ([]byte, *Bo
|
||||||
n := (*[BoxNonceLen]byte)(nonce)
|
n := (*[BoxNonceLen]byte)(nonce)
|
||||||
temp := append(pool.Get().([]byte), unboxed...)
|
temp := append(pool.Get().([]byte), unboxed...)
|
||||||
boxed := box.SealAfterPrecomputation(unboxed[:0], temp, n, s)
|
boxed := box.SealAfterPrecomputation(unboxed[:0], temp, n, s)
|
||||||
pool.Put(temp[:0])
|
pool.Put(temp[:0]) // nolint:staticcheck
|
||||||
return boxed, nonce
|
return boxed, nonce
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
type in6_addrlifetime struct {
|
type in6_addrlifetime struct {
|
||||||
ia6t_expire float64 // nolint:unused nolint:structcheck
|
ia6t_expire float64 // nolint:unused,structcheck
|
||||||
ia6t_preferred float64 // nolint:unused nolint:structcheck
|
ia6t_preferred float64 // nolint:unused,structcheck
|
||||||
ia6t_vltime uint32
|
ia6t_vltime uint32
|
||||||
ia6t_pltime uint32
|
ia6t_pltime uint32
|
||||||
}
|
}
|
||||||
|
@ -50,16 +50,16 @@ type in6_addrlifetime struct {
|
||||||
type sockaddr_in6 struct {
|
type sockaddr_in6 struct {
|
||||||
sin6_len uint8
|
sin6_len uint8
|
||||||
sin6_family uint8
|
sin6_family uint8
|
||||||
sin6_port uint8 // nolint:unused nolint:structcheck
|
sin6_port uint8 // nolint:unused,structcheck
|
||||||
sin6_flowinfo uint32 // nolint:unused nolint:structcheck
|
sin6_flowinfo uint32 // nolint:unused,structcheck
|
||||||
sin6_addr [8]uint16
|
sin6_addr [8]uint16
|
||||||
sin6_scope_id uint32 // nolint:unused nolint:structcheck
|
sin6_scope_id uint32 // nolint:unused,structcheck
|
||||||
}
|
}
|
||||||
|
|
||||||
type in6_aliasreq struct {
|
type in6_aliasreq struct {
|
||||||
ifra_name [16]byte
|
ifra_name [16]byte
|
||||||
ifra_addr sockaddr_in6
|
ifra_addr sockaddr_in6
|
||||||
ifra_dstaddr sockaddr_in6 // nolint:unused nolint:structcheck
|
ifra_dstaddr sockaddr_in6 // nolint:unused,structcheck
|
||||||
ifra_prefixmask sockaddr_in6
|
ifra_prefixmask sockaddr_in6
|
||||||
ifra_flags uint32
|
ifra_flags uint32
|
||||||
ifra_lifetime in6_addrlifetime
|
ifra_lifetime in6_addrlifetime
|
||||||
|
|
|
@ -16,5 +16,5 @@ func pool_getBytes(size int) []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
func pool_putBytes(bs []byte) {
|
func pool_putBytes(bs []byte) {
|
||||||
pool.Put(bs)
|
pool.Put(bs) // nolint:staticcheck
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue