normalize

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address(addr, defaultPort string, userOnly bool) (a string, e error)

Address returns addr with the passed default port appended if there is not already a port specified.

func Addresses

func Addresses(addrs []string, defaultPort string, userOnly bool) (a []string,
	e error)

Addresses returns a new slice with all the passed peer addresses normalized with the given default port, and all duplicates removed.

func ClampPortRange

func ClampPortRange(port, defaultPort string, min, max int) string

func RemoveDuplicateAddresses

func RemoveDuplicateAddresses(addrs []string) (result []string)

RemoveDuplicateAddresses returns a new slice with all duplicate entries in addrs removed.

func ResolvePath

func ResolvePath(input, appName string, abs bool) (cleaned string, e error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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