Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LevelParentMap ¶
type Option ¶
func GetDefaultOption ¶
func GetDefaultOption() *Option
type TraverseResultMap ¶
type TraverseResultMap struct {
M map[*TreeElem]interface{}
}
type TreeElem ¶
type TreeElem struct { Data interface{} // dir no data Next []*TreeElem Leaf bool Path string Name string Level int // contains filtered or unexported fields }
func DirTree ¶
func DirTree(p string, opts ...WithOption) *TreeElem
func NewElement ¶
func NewElement(data interface{}) *TreeElem
func NewRooElem ¶
func NewRooElem() *TreeElem
func PlantPathTree ¶
func (*TreeElem) GetMindMapData ¶
func (t *TreeElem) GetMindMapData() *vision.MindMapItem
func (*TreeElem) PathString ¶
func (*TreeElem) TraverseAndHandleResult ¶
func (t *TreeElem) TraverseAndHandleResult(tf func(data interface{}) interface{}, hf func(data ...interface{}) interface{}, opts ...TreeOption) *TraverseResultMap
type TreeOption ¶
type TreeOption func(o *Option)
func WithTraverseCache ¶
func WithTraverseCache() TreeOption
type WithOption ¶
type WithOption func(o *Option)
Click to show internal directories.
Click to hide internal directories.