Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDValueArr ¶
type IDValueArr []IDValue
type IDValueOther ¶
type IDValueOther struct { ID string `json:"id"` Value string `json:"value"` Other map[string]any `json:"other"` }
带额外数据的id value
type IID ¶
type IID interface {
GeID() string
}
获取指定key的集合 一般获取id name等 注: 此接口一个结构生成的是固定的数组 需要支持多字段转数组的,可使用 IKeyValue
type IIDArr ¶
type IIDArr[V IID] []V
注: 此接口一个结构生成的是固定的数组 需要支持多字段转数组的,可使用 IKeyArr
func (IIDArr[V]) KeysUnique ¶
type IIDValueArr ¶
type IIDValueArr[V IIDValue] []V
func (IIDValueArr[V]) ToIDValueArr ¶
func (arr IIDValueArr[V]) ToIDValueArr() IDValueArr
数组直接转为 IDValue 数组
type IKeyArr ¶
type IKeyArr[V IKey] []V
注: 此接口一个结构生成的是固定的数组 需要支持多字段转数组的,可使用 IKeyArr
func (IKeyArr[V]) KeysUnique ¶
type TreeObject ¶
type TreeObject struct { ID string `json:"id"` Name string `json:"name"` Node ITree `json:"node"` Children []*TreeObject `json:"children,omitempty"` }
树结构对象
Click to show internal directories.
Click to hide internal directories.