From 5b06a6ed69d78a07acac4082d1640eb9b4212dde Mon Sep 17 00:00:00 2001 From: Daniel Czerwonk <daniel@dan-nrw.de> Date: Wed, 27 Jun 2018 13:13:31 +0200 Subject: [PATCH] added tests for new IP type --- net/ip.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/ip.go b/net/ip.go index efbac355..c82a2eef 100644 --- a/net/ip.go +++ b/net/ip.go @@ -6,12 +6,14 @@ type IP struct { lower uint64 } +// IPv4 returns a new `IP` representing an IPv4 address func IPv4(val uint32) IP { return IP{ lower: uint64(val), } } +// IPv6 returns a new `IP` representing an IPv6 address func IPv6(higher, lower uint64) IP { return IP{ higher: higher, -- GitLab