diff options
author | Christopher Koch <chrisko@google.com> | 2018-12-29 09:16:15 -0800 |
---|---|---|
committer | insomniac <insomniacslk@users.noreply.github.com> | 2019-01-11 19:38:21 +0000 |
commit | 9492662dae0651fd4d6698d35b58ade7300e149e (patch) | |
tree | 77f53ebd6dfded05880c322005909b97a1cf140c /dhcpv4/modifiers_test.go | |
parent | 512011c2eb80a7c0316405ef7aaae6e0b5b09b1c (diff) |
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.
Diffstat (limited to 'dhcpv4/modifiers_test.go')
-rw-r--r-- | dhcpv4/modifiers_test.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/dhcpv4/modifiers_test.go b/dhcpv4/modifiers_test.go index 15dbebf..6d3976e 100644 --- a/dhcpv4/modifiers_test.go +++ b/dhcpv4/modifiers_test.go @@ -49,8 +49,6 @@ func TestUserClassModifier(t *testing.T) { userClass := WithUserClass([]byte("linuxboot"), false) d = userClass(d) expected := []byte{ - 77, // OptionUserClass - 9, // length 'l', 'i', 'n', 'u', 'x', 'b', 'o', 'o', 't', } require.Equal(t, "User Class Information -> linuxboot", d.Options[0].String()) @@ -62,8 +60,6 @@ func TestUserClassModifierRFC(t *testing.T) { userClass := WithUserClass([]byte("linuxboot"), true) d = userClass(d) expected := []byte{ - 77, // OptionUserClass - 10, // length 9, 'l', 'i', 'n', 'u', 'x', 'b', 'o', 'o', 't', } require.Equal(t, "User Class Information -> linuxboot", d.Options[0].String()) |