netutils

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressName

func CompressName(originalName string, targetLength int, namePostFix string) (name string)

CompressName compresses name to targetLength with specified postfix targetLength < 7 or targetLength-7-len(namePostFix) < 0 are not allowed

func IPToCidr

func IPToCidr(ip string) string

IPToCidr converts from an ip to a full mask cidr

func ResolveCidr

func ResolveCidr(name string) ([]string, error)

ResolveCidr converts cidr/ip/domain into cidr

func ResolveCidrs

func ResolveCidrs(names []string) ([]string, error)

ResolveCidrs converts multiple cidrs/ips/domains into cidr

Types

This section is empty.

Jump to

Keyboard shortcuts

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