cidr

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CIDR

type CIDR struct {
	*net.IPNet
}

CIDR is a network CIDR representation based on net.IPNet

func DiffCIDRLists

func DiffCIDRLists(old, new []*CIDR) (add, remove []*CIDR)

DiffCIDRLists compares an old and new list of CIDRs and returns the list of removed and added CIDRs

func MustParseCIDR

func MustParseCIDR(str string) *CIDR

MustParseCIDR parses the CIDR string using net.ParseCIDR and panics if the CIDR cannot be parsed

func NewCIDR

func NewCIDR(ipnet *net.IPNet) *CIDR

NewCIDR returns a new CIDR using a net.IPNet

func ParseCIDR

func ParseCIDR(str string) (*CIDR, error)

ParseCIDR parses the CIDR string using net.ParseCIDR

func (*CIDR) DeepCopy

func (n *CIDR) DeepCopy() *CIDR

DeepCopy creates a deep copy of a CIDR

Jump to

Keyboard shortcuts

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