ipranger helps you to keep track of yours ip with the integration of ProjectDiscovery hmap key value store.
ipranger also integrate mapcidr library:
...
ips, err := ipranger.Ips("127.0.0.1/16")
if err != nil {
panic(err)
}
fmt.Println(len(ips))
...
ipranger is distributed under MIT License