1
0
forked from rosa/hakurei

internal/netlink: export generic connection

This enables abstractions around some families to be implemented in a separate package.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-27 18:10:17 +09:00
parent 6a87a96838
commit c61188649b
4 changed files with 52 additions and 46 deletions

View File

@@ -7,7 +7,7 @@ import (
type payloadTestCase struct {
name string
f func(c *conn)
f func(c *Conn)
want []byte
}
@@ -21,7 +21,7 @@ func checkPayload(t *testing.T, testCases []payloadTestCase) {
t.Parallel()
t.Helper()
c := conn{port: 1, pos: syscall.NLMSG_HDRLEN}
c := Conn{port: 1, pos: syscall.NLMSG_HDRLEN}
tc.f(&c)
if got := c.pending(); string(got) != string(tc.want) {
t.Errorf("pending: %#v, want %#v", got, tc.want)