util

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAddrList added in v0.20.0

func ParseAddrList(addrList []string) ([]netip.Addr, error)

ParseAddrList parses a list of IP address strings and returns a list of netip.Addr.

func ParseAddrPortList added in v0.20.0

func ParseAddrPortList(addrPortList []string) ([]netip.AddrPort, error)

ParseAddrPortList parses a list of IP address and port strings and returns a list of netip.AddrPort.

func PrefixRange

func PrefixRange(p netip.Prefix) (startAddr netip.Addr, endAddr netip.Addr, err error)

PrefixRange takes a netip.Prefix and calculates the starting and ending IP addresses.

func Shuffle added in v0.19.0

func Shuffle[T any](s []T) []T

Shuffle shuffles the elements of a slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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