Skip to content
Snippets Groups Projects
Commit 5b06a6ed authored by Daniel Czerwonk's avatar Daniel Czerwonk
Browse files

added tests for new IP type

parent 08c9b220
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment