go-cidr icon indicating copy to clipboard operation
go-cidr copied to clipboard

FeatReq: Generate RandomHost from given CIDR

Open rustycl0ck opened this issue 4 years ago • 0 comments

Thank you for creating and maintaining this library. It makes life much easier when dealing with IPs.

It would be nice to have a function RandomHost just like the Host, which would return a random IP from the given CIDR range.

func RandomHost(base *net.IPNet) (net.IP, error)

rustycl0ck avatar Jan 06 '21 06:01 rustycl0ck