Documentation ¶
Index ¶
- func ClearSignals(c chan<- os.Signal)
- func CopyBytes(b []byte) []byte
- func HandleSignals(f func(os.Signal), sigs ...os.Signal) chan<- os.Signal
- func IsSorted2DBytes(arr [][]byte) bool
- func IsSortedAndUnique(data sort.Interface) bool
- func IsSortedAndUniqueUint32(u32 []uint32) bool
- func IsSortedAndUniqueUint64(u64 []uint64) bool
- func Sort2DBytes(arr [][]byte)
- func SortUint32(u32 []uint32)
- func SortUint64(u64 []uint64)
- type IPDesc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearSignals ¶ added in v0.5.0
ClearSignals clears any signals that have been registered on the provided channel and closes the channel.
func CopyBytes ¶ added in v0.5.0
CopyBytes returns a copy of the provided byte slice. If nil is provided, nil will be returned.
func HandleSignals ¶ added in v0.5.0
HandleSignals calls f if the go runtime receives the any of the provided signals with the received signal.
If f is nil or there are no provided signals, then nil will be returned. Otherwise, a signal channel will be returned that can be used to clear the signals registed by this function by valling ClearSignals.
func IsSorted2DBytes ¶ added in v0.6.1
IsSorted2DBytes returns true iff [arr] is sorted
func IsSortedAndUnique ¶
IsSortedAndUnique returns true if the elements in the data are unique and sorted.
func IsSortedAndUniqueUint32 ¶
IsSortedAndUniqueUint32 returns true if the array of uint32s are sorted and unique
func IsSortedAndUniqueUint64 ¶ added in v0.6.1
IsSortedAndUniqueUint64 returns true if the array of uint64s are sorted and unique
func Sort2DBytes ¶ added in v0.6.1
func Sort2DBytes(arr [][]byte)
Sort2DBytes sorts a 2D byte array Each byte array is not sorted internally; the byte arrays are sorted relative to another.