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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user