IPv4Mask returns the IP mask (in 4-byte form) of the IPv4 mask a.b.c.d.
package main import ( "fmt" "net" ) func main() { fmt.Println(net.IPv4Mask(255, 255, 255, 0)) }