diff options
author | Chris Koch <chrisko@google.com> | 2023-02-18 13:59:40 -0800 |
---|---|---|
committer | Chris K <c@chrisko.ch> | 2023-02-18 23:57:24 -0800 |
commit | 10146be7d8494d72e98d40df63cc0d65501e169f (patch) | |
tree | b6e43a11ae6ae60149af06af11d615c4ad7c2055 /dhcpv6/option_4rd.go | |
parent | a5c8a4bf9480a9c8cd16ab84914f7d646f3c0130 (diff) |
Normalize String functions
Signed-off-by: Chris Koch <chrisko@google.com>
Diffstat (limited to 'dhcpv6/option_4rd.go')
-rw-r--r-- | dhcpv6/option_4rd.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dhcpv6/option_4rd.go b/dhcpv6/option_4rd.go index d9ac0a4..317f13a 100644 --- a/dhcpv6/option_4rd.go +++ b/dhcpv6/option_4rd.go @@ -24,7 +24,7 @@ func (op *Opt4RD) ToBytes() []byte { // String returns a human-readable representation of the option func (op *Opt4RD) String() string { - return fmt.Sprintf("Opt4RD{%v}", op.Options) + return fmt.Sprintf("%s: {Options=%v}", op.Code(), op.Options) } // ParseOpt4RD builds an Opt4RD structure from a sequence of bytes. @@ -96,8 +96,8 @@ func (op *Opt4RDMapRule) ToBytes() []byte { // String returns a human-readable description of this option func (op *Opt4RDMapRule) String() string { - return fmt.Sprintf("Opt4RDMapRule{Prefix4=%s, Prefix6=%s, EA-Bits=%d, WKPAuthorized=%t}", - op.Prefix4.String(), op.Prefix6.String(), op.EABitsLength, op.WKPAuthorized) + return fmt.Sprintf("%s: {Prefix4=%s, Prefix6=%s, EA-Bits=%d, WKPAuthorized=%t}", + op.Code(), op.Prefix4.String(), op.Prefix6.String(), op.EABitsLength, op.WKPAuthorized) } // ParseOpt4RDMapRule builds an Opt4RDMapRule structure from a sequence of bytes. @@ -156,8 +156,8 @@ func (op *Opt4RDNonMapRule) String() string { tClass = *op.TrafficClass } - return fmt.Sprintf("Opt4RDNonMapRule{HubAndSpoke=%t, TrafficClass=%v, DomainPMTU=%d}", - op.HubAndSpoke, tClass, op.DomainPMTU) + return fmt.Sprintf("%s: {HubAndSpoke=%t, TrafficClass=%v, DomainPMTU=%d}", + op.Code(), op.HubAndSpoke, tClass, op.DomainPMTU) } // ParseOpt4RDNonMapRule builds an Opt4RDNonMapRule structure from a sequence of bytes. |