mirror of
https://github.com/vishvananda/netlink
synced 2024-12-18 21:04:56 +00:00
Merge pull request #53 from dcbw/addr-trim-whitespace
Trim whitespace from Addr.String()
This commit is contained in:
commit
9168c87284
2
addr.go
2
addr.go
@ -15,7 +15,7 @@ type Addr struct {
|
||||
|
||||
// String returns $ip/$netmask $label
|
||||
func (a Addr) String() string {
|
||||
return fmt.Sprintf("%s %s", a.IPNet, a.Label)
|
||||
return strings.TrimSpace(fmt.Sprintf("%s %s", a.IPNet, a.Label))
|
||||
}
|
||||
|
||||
// ParseAddr parses the string representation of an address in the
|
||||
|
Loading…
Reference in New Issue
Block a user