xenolog / cidr32

Go-lang library to manipulate CIDR and IP range objects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cidr32

Go-lang library to manipulate CIDR and IP range objects

usage:

import (
    "net"
    cidr32 "github.com/xenolog/cidr32/v0"
)

// ...

_, cidr, _ := net.ParseCIDR("192.168.1.0/25")
baseRange := cidr32.CidrToRange(cidr, true)

a := baseRange.String() // will be "192.168.1.0-192.168.1.126"



About

Go-lang library to manipulate CIDR and IP range objects

License:Apache License 2.0


Languages

Language:Go 100.0%