1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-12 16:52:29 +08:00

feat: add Sort function for slice

This commit is contained in:
dudaodong
2022-12-01 22:46:56 +08:00
parent d66f92cd68
commit ec27ad4c40
4 changed files with 77 additions and 1 deletions

View File

@@ -16,3 +16,8 @@ type Comparator interface {
type Number interface {
~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ~float32 | ~float64
}
// Ordered is a constraint that permits any ordered type: any type that supports the operators < <= >= >
type Ordered interface {
Number | ~string
}