summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dhcpv4/option_relay_agent_information.go2
-rw-r--r--dhcpv4/option_relay_agent_information_test.go6
2 files changed, 7 insertions, 1 deletions
diff --git a/dhcpv4/option_relay_agent_information.go b/dhcpv4/option_relay_agent_information.go
index 75bbef0..447783e 100644
--- a/dhcpv4/option_relay_agent_information.go
+++ b/dhcpv4/option_relay_agent_information.go
@@ -60,7 +60,7 @@ func (o *OptRelayAgentInformation) ToBytes() []byte {
// String returns a human-readable string for this option.
func (o *OptRelayAgentInformation) String() string {
- return fmt.Sprintf("Relay Agent Information -> [%v]", o.Options)
+ return fmt.Sprintf("Relay Agent Information -> %v", o.Options)
}
// Length returns the length of the data portion (excluding option code and byte
diff --git a/dhcpv4/option_relay_agent_information_test.go b/dhcpv4/option_relay_agent_information_test.go
index 68b5c73..2b7b7a3 100644
--- a/dhcpv4/option_relay_agent_information_test.go
+++ b/dhcpv4/option_relay_agent_information_test.go
@@ -39,3 +39,9 @@ func TestParseOptRelayAgentInformationToBytes(t *testing.T) {
}
require.Equal(t, expected, data)
}
+
+func TestOptRelayAgentInformationToBytesString(t *testing.T) {
+ o := OptRelayAgentInformation{}
+ require.Equal(t, "Relay Agent Information -> []", o.String())
+}
+