Simple golang package provided go 1.23 iterator for IP subnet Current available iterator for IPv4 Example func main { for ip := range SubnetV4Seq("192.168.10.10/24") { fmt.Println(ip.String()) } } It will print ip addresses from 192.168.10.0 to 192.168.10.255