{"modulePath":"github.com/AlaudaDevops/pkg","version":"v0.14.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package networkutils\n\nPackage networkutils contains functions to help with network operations\n\n## Functions\n\n```go\nfunc IsPrivateAddress(addr string) bool\n```\nIsPrivateAddress returns true if given address in format \"\\\u003chost\u003e\\[:\\\u003cport\u003e]\" is a localhost or an ip from private network range (e.g. 172.30.0.1, 192.168.0.1).\n\n```go\nfunc ParseCIDRMask(cidr string) (*net.IPNet, error)\n```\nParseCIDRMask parses a CIDR string and ensures that it has no bits set beyond the network mask length. Use this when the input is supposed to be either a description of a subnet (eg, \"192.168.1.0/24\", meaning \"192.168.1.0 to 192.168.1.255\"), or a mask for matching against (eg, \"192.168.1.15/32\", meaning \"must match all 32 bits of the address \"192.168.1.15\"). Use net.ParseCIDR() when the input is a host address that also describes the subnet that it is on (eg, \"192.168.1.15/24\", meaning \"the address 192.168.1.15 on the network 192.168.1.0/24\").\n\n","path":"github.com/AlaudaDevops/pkg/networkutils","name":"networkutils","synopsis":"Package networkutils contains functions to help with network operations","isRedistributable":true}
