github.com/slackhq/nebula@v1.9.0/cidr/parse.go (about) 1 package cidr 2 3 import "net" 4 5 // Parse is a convenience function that returns only the IPNet 6 // This function ignores errors since it is primarily a test helper, the result could be nil 7 func Parse(s string) *net.IPNet { 8 _, c, _ := net.ParseCIDR(s) 9 return c 10 }