feat: generic 包新增 IDR、IDW、IDRW 的泛型通用接口
This commit is contained in:
parent
df5f2f886f
commit
5259e07a32
|
@ -4,11 +4,24 @@ type IdR[ID comparable] interface {
|
||||||
GetId() ID
|
GetId() ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IDR[ID comparable] interface {
|
||||||
|
GetID() ID
|
||||||
|
}
|
||||||
|
|
||||||
type IdW[ID comparable] interface {
|
type IdW[ID comparable] interface {
|
||||||
SetId(id ID)
|
SetId(id ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
type IdRW[ID comparable] interface {
|
type IDW[ID comparable] interface {
|
||||||
|
SetID(id ID)
|
||||||
|
}
|
||||||
|
|
||||||
|
type IdR2W[ID comparable] interface {
|
||||||
IdR[ID]
|
IdR[ID]
|
||||||
IdW[ID]
|
IdW[ID]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type IDR2W[ID comparable] interface {
|
||||||
|
IDR[ID]
|
||||||
|
IDW[ID]
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue