gitee.com/sy_183/go-common@v1.0.5-0.20231205030221-958cfe129b47/generic/type.go (about) 1 package generic 2 3 type Unsigned interface { 4 ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr 5 } 6 7 type Signed interface { 8 ~int | ~int8 | ~int16 | ~int32 | ~int64 9 } 10 11 type Integer interface { 12 Unsigned | Signed 13 } 14 15 type Float interface { 16 ~float32 | ~float64 17 } 18 19 type Complex interface { 20 ~complex64 | ~complex128 21 } 22 23 type OrderedNumber interface { 24 Integer | Float 25 } 26 27 type Number interface { 28 OrderedNumber | Complex 29 } 30 31 type Ordered interface { 32 OrderedNumber | ~string 33 }