utils

package
v0.0.0-...-3f3b006 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSortedAndUnique

func IsSortedAndUnique(data sort.Interface) bool

IsSortedAndUnique returns true if the elements in the data are unique and sorted.

func IsSortedAndUniqueUint32

func IsSortedAndUniqueUint32(u32 []uint32) bool

IsSortedAndUniqueUint32 returns true if the array of uint32s are sorted and unique

func MyIP

func MyIP() net.IP

MyIP ...

func SortUint32

func SortUint32(u32 []uint32)

SortUint32 sorts an uint32 array

Types

type IPDesc

type IPDesc struct {
	IP   net.IP
	Port uint16
}

IPDesc ...

func ToIPDesc

func ToIPDesc(str string) (IPDesc, error)

ToIPDesc ... TODO: this was kinda hacked together, it should be verified.

func (IPDesc) Equal

func (ipDesc IPDesc) Equal(otherIPDesc IPDesc) bool

Equal ...

func (IPDesc) PortString

func (ipDesc IPDesc) PortString() string

PortString ...

func (IPDesc) String

func (ipDesc IPDesc) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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