all: fix invalid directive syntax for golangci-lint nolint (#1799)

This commit is contained in:
wit liu 2025-12-08 15:32:54 +08:00 committed by GitHub
parent bfbb024dc4
commit ea3a55aef4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 10 deletions

View file

@ -35,10 +35,12 @@ type memoryNode struct {
// memoryNodeSize is the raw size of a memoryNode data structure without any // memoryNodeSize is the raw size of a memoryNode data structure without any
// node data included. It's an approximate size, but should be a lot better // node data included. It's an approximate size, but should be a lot better
// than not counting them. // than not counting them.
//
//nolint:unused //nolint:unused
var memoryNodeSize = int(reflect.TypeOf(memoryNode{}).Size()) var memoryNodeSize = int(reflect.TypeOf(memoryNode{}).Size())
// memorySize returns the total memory size used by this node. // memorySize returns the total memory size used by this node.
//
//nolint:unused //nolint:unused
func (n *memoryNode) memorySize(key int) int { func (n *memoryNode) memorySize(key int) int {
return int(n.size) + memoryNodeSize + key return int(n.size) + memoryNodeSize + key
@ -46,6 +48,7 @@ func (n *memoryNode) memorySize(key int) int {
// rlp returns the raw rlp encoded blob of the cached trie node, either directly // rlp returns the raw rlp encoded blob of the cached trie node, either directly
// from the cache, or by regenerating it from the collapsed node. // from the cache, or by regenerating it from the collapsed node.
//
//nolint:unused //nolint:unused
func (n *memoryNode) rlp() []byte { func (n *memoryNode) rlp() []byte {
if node, ok := n.node.(rawNode); ok { if node, ok := n.node.(rawNode); ok {
@ -56,6 +59,7 @@ func (n *memoryNode) rlp() []byte {
// obj returns the decoded and expanded trie node, either directly from the cache, // obj returns the decoded and expanded trie node, either directly from the cache,
// or by regenerating it from the rlp encoded blob. // or by regenerating it from the rlp encoded blob.
//
//nolint:unused //nolint:unused
func (n *memoryNode) obj() node { func (n *memoryNode) obj() node {
if node, ok := n.node.(rawNode); ok { if node, ok := n.node.(rawNode); ok {