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

feat(head): add more method to packet

This commit is contained in:
源文雨
2025-02-26 00:07:39 +09:00
parent fa7b9d4f0a
commit f0a853e449
7 changed files with 39 additions and 29 deletions

View File

@@ -47,7 +47,7 @@ func TestMarshalUnmarshal(t *testing.T) {
t.Fatal("index", i)
}
if !p.Pointer().IsVaildHash() {
t.Fatal("index", i, "expect body", hex.EncodeToString(data.SliceTo(i).Bytes()), "got", hex.EncodeToString(p.Pointer().Body()))
t.Fatal("index", i, "expect body", hex.EncodeToString(data.SliceTo(i).Bytes()), "got", hex.EncodeToString(p.Pointer().UnsafeBody()))
}
if p.Pointer().Proto != proto {
t.Fatal("index", i)