Add tcpip.AddressWithPrefix.String
PiperOrigin-RevId: 263436592
This commit is contained in:
parent
570fb1db6b
commit
69d1414a32
|
@ -1072,6 +1072,11 @@ type AddressWithPrefix struct {
|
|||
PrefixLen int
|
||||
}
|
||||
|
||||
// String implements the fmt.Stringer interface.
|
||||
func (a AddressWithPrefix) String() string {
|
||||
return fmt.Sprintf("%s/%d", a.Address, a.PrefixLen)
|
||||
}
|
||||
|
||||
// ProtocolAddress is an address and the network protocol it is associated
|
||||
// with.
|
||||
type ProtocolAddress struct {
|
||||
|
|
Loading…
Reference in New Issue