Documentation
¶
Index ¶
- func CopyBytes(b []byte) []byte
- func Detach(ctx context.Context) context.Context
- func GetStacktrace(all bool) string
- func IsSortedAndUnique(data sort.Interface) booldeprecated
- func IsSortedAndUniqueByHash[T ~[]byte](s []T) bool
- func IsSortedAndUniqueOrdered[T constraints.Ordered](s []T) bool
- func IsSortedAndUniqueSortable[T Sortable[T]](s []T) bool
- func IsUnique[T comparable](elts []T) bool
- func RandomBytes(n int) []byte
- func Sort[T Sortable[T]](s []T)
- func SortByHash[T ~[]byte](s []T)
- func SortBytes[T ~[]byte](arr []T)
- func Zero[T any]() T
- type AtomicBool
- type AtomicInterface
- type Sortable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyBytes ¶
CopyBytes returns a copy of the provided byte slice. If nil is provided, nil will be returned.
func GetStacktrace ¶ added in v1.10.9
func IsSortedAndUnique
deprecated
func IsSortedAndUniqueByHash ¶ added in v1.10.9
Returns true iff the elements in [s] are unique and sorted based by their hashes.
func IsSortedAndUniqueOrdered ¶ added in v1.10.9
func IsSortedAndUniqueOrdered[T constraints.Ordered](s []T) bool
Returns true iff the elements in [s] are unique and sorted.
func IsSortedAndUniqueSortable ¶
Returns true iff the elements in [s] are unique and sorted.
func IsUnique ¶
func IsUnique[T comparable](elts []T) bool
Returns true iff the elements in [s] are unique.
func RandomBytes ¶ added in v1.10.9
RandomBytes returns a slice of n random bytes Intended for use in testing
func SortByHash ¶ added in v1.10.9
func SortByHash[T ~[]byte](s []T)
Sorts the elements of [s] based on their hashes.
Types ¶
type AtomicBool ¶ added in v1.10.9
type AtomicBool struct {
// contains filtered or unexported fields
}
func (*AtomicBool) GetValue ¶ added in v1.10.9
func (a *AtomicBool) GetValue() bool
func (*AtomicBool) SetValue ¶ added in v1.10.9
func (a *AtomicBool) SetValue(b bool)
type AtomicInterface ¶ added in v1.10.9
type AtomicInterface struct {
// contains filtered or unexported fields
}
func NewAtomicInterface ¶ added in v1.10.9
func NewAtomicInterface(v interface{}) *AtomicInterface
func (*AtomicInterface) GetValue ¶ added in v1.10.9
func (a *AtomicInterface) GetValue() interface{}
func (*AtomicInterface) SetValue ¶ added in v1.10.9
func (a *AtomicInterface) SetValue(v interface{})
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
keychain
Package keychain is a generated GoMock package.
|
Package keychain is a generated GoMock package. |
Package filesystem is a generated GoMock package.
|
Package filesystem is a generated GoMock package. |
Package hashing is a generated GoMock package.
|
Package hashing 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. |
Click to show internal directories.
Click to hide internal directories.