Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
/ cidrxpndr Public archive

Go library - convert CIDR notation to list of IPs

Notifications You must be signed in to change notification settings

jamiealquiza/cidrxpndr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

cidrxpndr

Go library - convert CIDR notation to list of IPs

Example

package main

import (
	"fmt"

	"github.com/jamiealquiza/cidrxpndr"
)

func main() {
        ips, _ := cidrxpndr.Expand("10.0.1.248/28")
        for _, i := range ips {
        	fmt.Println(i)
        }
}
$ go run example.go
10.0.1.249
10.0.1.250
10.0.1.251
10.0.1.252
10.0.1.253
10.0.1.254
10.0.2.1
10.0.2.2
10.0.2.3
10.0.2.4
10.0.2.5
10.0.2.6
10.0.2.7
10.0.2.8

About

Go library - convert CIDR notation to list of IPs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages