tree_render

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2021 License: MIT Imports: 1 Imported by: 1

README

tree_render

将树形结构以一种便于阅读的形式呈现

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(root Node, minLeafDistance uint32) string

生成以root为根的前缀树的可视化表示

Types

type Node

type Node interface {
	Id() string // 返回结点Id,要求每个结点唯一
	Children() []Node
	String() string // 返回结点的字符串表示,要求不存在换行符
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL