From 9371890638ba8194278b4222d778768aa9025f80 Mon Sep 17 00:00:00 2001 From: kercylan98 Date: Tue, 19 Dec 2023 15:59:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20generic=20=E5=8C=85=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Unsigned=20=E8=A1=A8=E7=A4=BA=E6=97=A0=E7=AC=A6=E5=8F=B7?= =?UTF-8?q?=E6=95=B4=E6=95=B0=E7=9A=84=E7=BA=A6=E6=9D=9F=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/generic/type.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/generic/type.go b/utils/generic/type.go index cbcd1c8..ea70ac4 100644 --- a/utils/generic/type.go +++ b/utils/generic/type.go @@ -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 浮点类型