From 9492662dae0651fd4d6698d35b58ade7300e149e Mon Sep 17 00:00:00 2001 From: Christopher Koch Date: Sat, 29 Dec 2018 09:16:15 -0800 Subject: dhcpv4: simplify marshaling options to binary. - Consolidate writing the option code and length to Options.Marshal rather than doing it in each individual option. - Use uio in marshaling code. --- dhcpv4/bsdp/bsdp_option_version_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dhcpv4/bsdp/bsdp_option_version_test.go') diff --git a/dhcpv4/bsdp/bsdp_option_version_test.go b/dhcpv4/bsdp/bsdp_option_version_test.go index d28f243..a74ea0e 100644 --- a/dhcpv4/bsdp/bsdp_option_version_test.go +++ b/dhcpv4/bsdp/bsdp_option_version_test.go @@ -10,7 +10,7 @@ func TestOptVersionInterfaceMethods(t *testing.T) { o := OptVersion{Version1_1} require.Equal(t, OptionVersion, o.Code(), "Code") require.Equal(t, 2, o.Length(), "Length") - require.Equal(t, []byte{2, 2, 1, 1}, o.ToBytes(), "ToBytes") + require.Equal(t, []byte{1, 1}, o.ToBytes(), "ToBytes") } func TestParseOptVersion(t *testing.T) { -- cgit v1.2.3