nolint SA6002

This commit is contained in:
Neil Alexander 2020-12-06 21:45:41 +00:00
parent fb6b828916
commit 3ccbd4e0fc
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 9 additions and 9 deletions

View file

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

View file

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

View file

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