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:
parent
f225fdbbe7
commit
e75a12e89d
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue