1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-26 22:00:27 +08:00

chore: make lint happy

This commit is contained in:
源文雨
2025-03-12 22:27:43 +09:00
parent c2dd7b5d05
commit 658916268a
2 changed files with 3 additions and 3 deletions

View File

@@ -51,7 +51,7 @@ func (p *Packet) WriteHeaderTo(buf *bytes.Buffer) {
(unsafe.Pointer)(p), (unsafe.Pointer)(p),
)[:]) )[:])
p.md5h8rem = int64(algo.MD5Hash8(buf.Bytes())) p.md5h8rem = int64(algo.MD5Hash8(buf.Bytes()))
binary.Write(buf, binary.LittleEndian, p.md5h8rem) _ = binary.Write(buf, binary.LittleEndian, p.md5h8rem)
return return
} }
w := bin.SelectWriter() w := bin.SelectWriter()
@@ -68,6 +68,6 @@ func (p *Packet) WriteHeaderTo(buf *bytes.Buffer) {
}) })
w.WriteUInt64(uint64(p.md5h8rem)) w.WriteUInt64(uint64(p.md5h8rem))
w.P(func(b *pbuf.Buffer) { w.P(func(b *pbuf.Buffer) {
buf.ReadFrom(b) _, _ = buf.ReadFrom(b)
}) })
} }

View File

@@ -137,7 +137,7 @@ func (pb *DataBuilder) Plain(teatyp uint8, additional uint16) *PacketBuilder {
w.Write(ub.Bytes()) w.Write(ub.Bytes())
w.P(func(b *pbuf.Buffer) { w.P(func(b *pbuf.Buffer) {
ub.Reset() ub.Reset()
ub.ReadFrom(b) _, _ = ub.ReadFrom(b)
}) })
})) }))
} }