Skip to content
Compact a list of IP prefixes
Go
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
vendor/github.com/nmische/ipaddr
LICENSE
README.md
go.mod
go.sum
ip_compact.go
renovate.json

README.md

ip_compact

CircleCI Go Report Card

"Compact" a list of IP prefixes (removing duplicates, merging adjacent ranges).

Installation

# go get github.com/x-way/ip_compact

Usage

# cat iplist.txt
192.168.4.0/24
192.168.5.0/24
2001:db8::123
192.168.6.0/23
192.168.5.5
2001:db8::123/128

# cat iplist.txt | ip_compact
2001:db8::123/128
192.168.4.0/22
You can’t perform that action at this time.