summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-10-11 15:20:52 -0700
committerShentubot <shentubot@google.com>2018-10-11 15:22:02 -0700
commit86680fa00240e3e439d1275f4f8bf89678cf3355 (patch)
tree301934f871e89b412470193c536e214605b7b593 /pkg
parente68d86e1bd47f7905e4452f7ce0e04e683561f85 (diff)
Add String() method to AddressMask
PiperOrigin-RevId: 216770391 Change-Id: Idcdc28b2fe9e1b0b63b8119d445f05a8bcbce81e
Diffstat (limited to 'pkg')
-rw-r--r--pkg/tcpip/tcpip.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go
index cef27948c..bf11c2175 100644
--- a/pkg/tcpip/tcpip.go
+++ b/pkg/tcpip/tcpip.go
@@ -139,6 +139,11 @@ type Address string
// AddressMask is a bitmask for an address.
type AddressMask string
+// String implements Stringer.
+func (a AddressMask) String() string {
+ return Address(a).String()
+}
+
// Subnet is a subnet defined by its address and mask.
type Subnet struct {
address Address