From 1d92458377371ff552c5e3a63e3a82379b38d151 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Tue, 11 Jan 2022 15:00:43 +0100 Subject: [PATCH] Wrap long lines Wrap the long lines in `get_test.go` to make it more readable. Put 10 items per line for `TestGetAndParseUnmarshal` and 16 items for `TestGetAndParseOK`. Signed-off-by: Benjamin Drung --- get_test.go | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/get_test.go b/get_test.go index c961f08..4c65033 100644 --- a/get_test.go +++ b/get_test.go @@ -42,7 +42,13 @@ func TestGetAndParseShort(t *testing.T) { } func TestGetAndParseUnmarshal(t *testing.T) { - msg := netlink.Message{Data: []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}} + msg := netlink.Message{ + Data: []byte{ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, + }, + } c := nltest.Dial(func(req []netlink.Message) ([]netlink.Message, error) { msg.Header.Sequence = req[0].Header.Sequence @@ -60,7 +66,32 @@ func TestGetAndParseUnmarshal(t *testing.T) { } func TestGetAndParseOK(t *testing.T) { - d := []byte{0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 128, 255, 255, 255, 255, 2, 0, 0, 0, 7, 0, 1, 0, 102, 113, 0, 0, 84, 0, 2, 0, 8, 0, 1, 0, 16, 39, 0, 0, 8, 0, 2, 0, 100, 0, 0, 0, 8, 0, 3, 0, 212, 11, 0, 0, 8, 0, 4, 0, 36, 59, 0, 0, 8, 0, 5, 0, 1, 0, 0, 0, 8, 0, 7, 0, 255, 255, 255, 255, 8, 0, 9, 0, 64, 156, 0, 0, 8, 0, 10, 0, 255, 3, 0, 0, 8, 0, 11, 0, 142, 12, 1, 0, 8, 0, 8, 0, 10, 0, 0, 0, 132, 0, 7, 0, 84, 0, 4, 0, 125, 97, 0, 0, 0, 0, 0, 0, 86, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 203, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 61, 37, 209, 53, 184, 251, 255, 255, 7, 0, 0, 255, 7, 0, 0, 0, 0, 0, 0, 227, 183, 1, 0, 20, 0, 1, 0, 139, 42, 111, 15, 0, 0, 0, 0, 159, 76, 30, 0, 0, 0, 0, 0, 24, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 44, 0, 3, 0, 139, 42, 111, 15, 0, 0, 0, 0, 159, 76, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 4, 0, 125, 97, 0, 0, 0, 0, 0, 0, 86, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 203, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 61, 37, 209, 53, 184, 251, 255, 255, 7, 0, 0, 255, 7, 0, 0, 0, 0, 0, 0, 227, 183, 1, 0} + d := []byte{ + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 128, 255, 255, 255, 255, + 2, 0, 0, 0, 7, 0, 1, 0, 102, 113, 0, 0, 84, 0, 2, 0, + 8, 0, 1, 0, 16, 39, 0, 0, 8, 0, 2, 0, 100, 0, 0, 0, + 8, 0, 3, 0, 212, 11, 0, 0, 8, 0, 4, 0, 36, 59, 0, 0, + 8, 0, 5, 0, 1, 0, 0, 0, 8, 0, 7, 0, 255, 255, 255, 255, + 8, 0, 9, 0, 64, 156, 0, 0, 8, 0, 10, 0, 255, 3, 0, 0, + 8, 0, 11, 0, 142, 12, 1, 0, 8, 0, 8, 0, 10, 0, 0, 0, + 132, 0, 7, 0, 84, 0, 4, 0, 125, 97, 0, 0, 0, 0, 0, 0, + 86, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 203, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 114, 61, 37, 209, 53, 184, 251, 255, 255, 7, 0, 0, 255, 7, 0, 0, + 0, 0, 0, 0, 227, 183, 1, 0, 20, 0, 1, 0, 139, 42, 111, 15, + 0, 0, 0, 0, 159, 76, 30, 0, 0, 0, 0, 0, 24, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, + 0, 0, 0, 0, 44, 0, 3, 0, 139, 42, 111, 15, 0, 0, 0, 0, + 159, 76, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 84, 0, 4, 0, 125, 97, 0, 0, 0, 0, 0, 0, 86, 82, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 203, 52, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 61, 37, 209, + 53, 184, 251, 255, 255, 7, 0, 0, 255, 7, 0, 0, 0, 0, 0, 0, + 227, 183, 1, 0, + } msg := netlink.Message{Data: d} c := nltest.Dial(func(req []netlink.Message) ([]netlink.Message, error) {