ipnet

package
v2.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ipnet contains helper functions around net and IP

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrEqual

func AddrEqual(a, b net.Addr) bool

AddrEqual asserts that two net.Addrs are equal Currently only supports UDP but will be extended in the future to support others

func AddrIPPort

func AddrIPPort(a net.Addr) (net.IP, int, error)

AddrIPPort extracts the IP and Port from a net.Addr

func FingerprintAddr added in v2.1.1

func FingerprintAddr(addr net.Addr) string

FingerprintAddr generates a fingerprint from net.UDPAddr or net.TCPAddr's which can be used for indexing maps.

Types

This section is empty.

Jump to

Keyboard shortcuts

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