mask

package
v0.4.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2016 License: MIT, MIT Imports: 5 Imported by: 0

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidFormat = errors.New("invalid multiaddr-filter format")

Functions

func ConvertIPNet

func ConvertIPNet(n *net.IPNet) (string, error)

func NewMask

func NewMask(a string) (*net.IPNet, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL