feat: generic 包新增 Unsigned 表示无符号整数的约束类型

This commit is contained in:
kercylan98 2023-12-19 15:59:56 +08:00
parent 05c65e9efd
commit 9371890638
1 changed files with 6 additions and 1 deletions

View File

@ -27,7 +27,12 @@ type Signed interface {
// Unsigned 无符号整数类型
type Unsigned interface {
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
UnsignedNumber | ~uintptr
}
// UnsignedNumber 无符号数字类型
type UnsignedNumber interface {
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}
// Float 浮点类型