netaddr

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 2 Imported by: 0

README

Netaddr Package

This package provides types representing IP addresses types.go and helper functions to filter interface IPs ips.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterInterfaceIPs

func FilterInterfaceIPs(filter func(ipnet *net.IPNet) bool) ([]net.IP, error)

func GetGlobalUnicastIPs

func GetGlobalUnicastIPs() ([]net.IP, error)

func GetPrivateIPs

func GetPrivateIPs() ([]net.IP, error)

Types

type RemoteAddrWithPort

type RemoteAddrWithPort string

func RemoteAddrWithPortFrom

func RemoteAddrWithPortFrom(s string) (RemoteAddrWithPort, error)

func (RemoteAddrWithPort) RemoteIp

func (s RemoteAddrWithPort) RemoteIp() RemoteIpAddr

func (RemoteAddrWithPort) String

func (s RemoteAddrWithPort) String() string

type RemoteIpAddr

type RemoteIpAddr string

func (RemoteIpAddr) String

func (s RemoteIpAddr) String() string

Jump to

Keyboard shortcuts

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