Go to file
kayos@tcp.direct 909db53116 init 2022-01-01 13:39:27 -08:00
README.md init 2022-01-01 13:39:27 -08:00
go.mod init 2022-01-01 13:39:27 -08:00
go.sum init 2022-01-01 13:39:27 -08:00
range.go init 2022-01-01 13:39:27 -08:00
util.go init 2022-01-01 13:39:27 -08:00

common

-- import "git.tcp.direct/kayos/common"

stuff I use a lot.

func Abs

func Abs(n int) int

func CompareChecksums

func CompareChecksums(a []byte, b []byte) bool

func Fprint

func Fprint(w io.Writer, s string)

Fprint is fmt.Fprint with error handling.

func RNG

func RNG(n int) int

Random Number Generator (uses a combo of crypto/rand and math/rand for better performance)

func RangeIterate

func RangeIterate(ips interface{}) chan *ipa.IP

IP Address iteration

func SnoozeMS

func SnoozeMS(n int)

Random sleep, max of n seconds.