Documentation ¶
Index ¶
- func CopyBytes(b []byte) []byte
- func GetStacktrace(all bool) string
- func IsSorted2DByteSlice[T ~[]byte](s []T) bool
- func IsSortedAndUnique(data sort.Interface) bool
- func IsSortedAndUniqueByHash[T ~[]byte](s []T) bool
- func IsSortedAndUniqueOrdered[T constraints.Ordered](s []T) bool
- func IsSortedAndUniqueSortable[T Sortable[T]](s []T) bool
- func RandomBytes(n int) []byte
- func Sort2DByteSlice[T ~[]byte](arr []T)
- func SortByHash[T ~[]byte](s []T)
- func SortSliceOrdered[T constraints.Ordered](s []T)
- func SortSliceSortable[T Sortable[T]](s []T)
- type AtomicBool
- type AtomicInterface
- type Sortable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyBytes ¶ added in v0.8.0
CopyBytes returns a copy of the provided byte slice. If nil is provided, nil will be returned.
func GetStacktrace ¶ added in v1.7.17
func IsSorted2DByteSlice ¶
IsSorted2DByteSlice returns true iff [s] is sorted. Note that each byte slice need not be sorted internally. The byte slices must be sorted relative to one another.
func IsSortedAndUnique ¶
IsSortedAndUnique returns true if the elements in the data are unique and sorted.
func IsSortedAndUniqueByHash ¶ added in v1.9.4
Returns true iff the elements in [s] are unique and sorted based by their hashes.
func IsSortedAndUniqueOrdered ¶ added in v1.9.4
func IsSortedAndUniqueOrdered[T constraints.Ordered](s []T) bool
Returns true iff the elements in [s] are unique and sorted.
func IsSortedAndUniqueSortable ¶ added in v1.9.4
Returns true iff the elements in [s] are unique and sorted.
func RandomBytes ¶ added in v1.3.2
RandomBytes returns a slice of n random bytes Intended for use in testing
func Sort2DByteSlice ¶
func Sort2DByteSlice[T ~[]byte](arr []T)
Sorts a 2D byte slice. Each byte slice is not sorted internally; the byte slices are sorted relative to one another.
func SortByHash ¶ added in v1.9.4
func SortByHash[T ~[]byte](s []T)
Sorts the elements of [s] based on their hashes.
func SortSliceOrdered ¶
func SortSliceOrdered[T constraints.Ordered](s []T)
Sorts the elements of [s].
Types ¶
type AtomicBool ¶ added in v1.0.3
type AtomicBool struct {
// contains filtered or unexported fields
}
func (*AtomicBool) GetValue ¶ added in v1.0.3
func (a *AtomicBool) GetValue() bool
func (*AtomicBool) SetValue ¶ added in v1.0.3
func (a *AtomicBool) SetValue(b bool)
type AtomicInterface ¶ added in v1.0.3
type AtomicInterface struct {
// contains filtered or unexported fields
}
func NewAtomicInterface ¶ added in v1.0.3
func NewAtomicInterface(v interface{}) *AtomicInterface
func (*AtomicInterface) GetValue ¶ added in v1.0.3
func (a *AtomicInterface) GetValue() interface{}
func (*AtomicInterface) SetValue ¶ added in v1.0.3
func (a *AtomicInterface) SetValue(v interface{})
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package sharding is a generated GoMock package.
|
Package sharding is a generated GoMock package. |
Package logging is a generated GoMock package.
|
Package logging is a generated GoMock package. |
Package resource is a generated GoMock package.
|
Package resource is a generated GoMock package. |