util

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasIPv4 added in v0.22.0

func HasIPv4(addrs []netip.Addr) bool

HasIPv4 returns true if the list of addresses contains an IPv4 address.

func HasIPv6 added in v0.22.0

func HasIPv6(addrs []netip.Addr) bool

HasIPv6 returns true if the list of addresses contains an IPv6 address.

func ParseAddrList added in v0.22.0

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

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

func Strings added in v0.22.0

func Strings[T fmt.Stringer](s []T) []string

Strings converts a slice of objects that implement fmt.Stringer to a slice of strings.

Types

This section is empty.

Jump to

Keyboard shortcuts

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