common

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: AGPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const Alphabet = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789"

Variables

This section is empty.

Functions

func BytesIncBigEndian

func BytesIncBigEndian(b []byte)

func BytesIncLittleEndian

func BytesIncLittleEndian(b []byte)

func Change

func Change(from interface{}, to interface{}, keyFunc func(elem interface{}) string) (toRemove interface{}, toAdd interface{})

Change returns how to change "from" slice to "to" slice by removing and adding elements. Elements from "from" and "to" should be unique.

func Deduplicate added in v0.1.8

func Deduplicate(list []string) []string

func HasTopDomain

func HasTopDomain(domain string) bool

func HomeExpand

func HomeExpand(path string) (string, error)

func Max

func Max(a, b int) int

func Min

func Min(a, b int) int

func MustMapKeys

func MustMapKeys(m interface{}) (keys []string)

func SeedSecurely

func SeedSecurely() (err error)

func StarMatch

func StarMatch(expr string, str string) bool

func ToIPNets

func ToIPNets(cidr []string) (nets []*net.IPNet, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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