|
||
---|---|---|
README.md | ||
go.mod | ||
go.sum | ||
range.go | ||
util.go |
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.