Categorygithub.com/whyrusleeping/multiaddr-filter
repositorypackage
0.0.0-20160516205228-e903e4adabd7
Repository: https://github.com/whyrusleeping/multiaddr-filter.git
Documentation: pkg.go.dev

# README

go-multiaddr-filter -- CIDR netmasks with multiaddr

This module creates very simple multiaddr formatted cidr netmasks.

It doesn't do full multiaddr parsing to save on vendoring things and perf. The net package will take care of verifying the validity of the network part anyway.

Usage


import filter "github.com/whyrusleeping/multiaddr-filter"

filter.NewMask("/ip4/192.168.0.0/24") // ipv4
filter.NewMask("/ip6/fe80::/64") // ipv6