From e75a12e89de123fb55f19fdf3457d1a200973f59 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Fri, 23 Aug 2019 10:42:53 -0700 Subject: Implement fmt.Stringer on Route by value This is more convenient, since it implements the interface for both value and pointer. PiperOrigin-RevId: 265086510 --- pkg/tcpip/tcpip.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/tcpip') diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index 043dd549b..8f9b86cce 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -581,7 +581,7 @@ type Route struct { } // String implements the fmt.Stringer interface. -func (r *Route) String() string { +func (r Route) String() string { var out strings.Builder fmt.Fprintf(&out, "%s", r.Destination) if len(r.Gateway) > 0 { -- cgit v1.2.3