Implement fmt.Stringer on Route by value

This is more convenient, since it implements the interface for both
value and pointer.

PiperOrigin-RevId: 265086510
This commit is contained in:
Tamir Duberstein 2019-08-23 10:42:53 -07:00 committed by gVisor bot
parent f225fdbbe7
commit e75a12e89d
1 changed files with 1 additions and 1 deletions

View File

@ -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 {