From a85b1024263ed37839510776ccb2ccb99b077181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 11 Apr 2026 15:13:24 +0800 Subject: [PATCH] chore: make lint happy --- gold/p2p/icmp/icmp.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gold/p2p/icmp/icmp.go b/gold/p2p/icmp/icmp.go index 2a36aa1..017e61c 100644 --- a/gold/p2p/icmp/icmp.go +++ b/gold/p2p/icmp/icmp.go @@ -38,7 +38,7 @@ func newPeerState() *peerState { ps := &peerState{} ps.seqpool = &sync.Pool{ New: func() any { - return int(ps.seq.Add(1)) + return ps.seq.Add(1) }, } return ps @@ -180,7 +180,7 @@ func (conn *Conn) ReadFromPeer(b []byte) (n int, ep p2p.EndPoint, err error) { ps := conn.getOrCreatePeerState(ipaddr) ps.id = body.ID ps.seq.Store(uintptr(body.Seq)) - ps.seqpool.Put(body.Seq) + ps.seqpool.Put(uintptr(body.Seq)) } n = copy(b, body.Data) if config.ShowDebugLog { @@ -197,7 +197,7 @@ func (conn *Conn) WriteToPeer(b []byte, ep p2p.EndPoint) (int, error) { } addr := (*netip.Addr)(icmpep) ps := conn.getOrCreatePeerState(*addr) - seq := ps.seqpool.Get().(int) + seq := int(ps.seqpool.Get().(uintptr)) id := ps.id isrequest := id == 0 if isrequest {