mask

package module
v0.0.0-...-e903e4a Latest Latest
Warning

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

Go to latest
Published: May 16, 2016 License: MIT Imports: 4 Imported by: 47

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