Documentation ¶
Index ¶
- func TestReadWriterCloser[RWC ReadWriterCloser](rw RWC)
- func TestToString()
- func ToString[T SignedToString](t T) string
- type AllInt
- type Empty
- type Int
- type IntOrFloat64
- type IntToString
- type List
- type MyFunc
- type MyList
- type MyList2
- type MyMap
- type MyMap2
- type ReadWriterCloser
- type S1
- type S2
- type S3
- type S4
- type S5
- type S6
- type S7
- type S8
- type S9
- type Signed
- type SignedToString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestReadWriterCloser ¶
func TestReadWriterCloser[RWC ReadWriterCloser](rw RWC)
func TestToString ¶
func TestToString()
func ToString ¶
func ToString[T SignedToString](t T) string
Types ¶
type IntOrFloat64 ¶
type IntToString ¶
type IntToString int
类型约束不能再当做普通的接口,只能用作类型约束
func (IntToString) ToString ¶
func (it IntToString) ToString() string
type MyFunc ¶
type MyFunc[T constraints.Ordered, V any] func(T) V
--------------------------- 泛型方法的扩展
type MyMap ¶
type MyMap[K comparable, V any] map[K]V
type MyMap2 ¶
type MyMap2[K comparable] map[K]int
Click to show internal directories.
Click to hide internal directories.