I want to display an object of type net.IPMask
in the same notation as net.IPAddr
. I want to be able to do this for both IPv4 and IPv6 masks. For instance:
"fffffe00" ---> "255.255.254.0"
I could accomplish this by manually parsing the object of type net.IPMask
. However, is there a way to accomplish this by converting an object of type net.IPMask
to an object of type net.IPAddr
, ideally using functions built in to the net package?