tidb: github.com/pingcap/tidb/util/texttree Index | Files

package texttree

import "github.com/pingcap/tidb/util/texttree"

Index

Package Files

texttree.go

Constants

const (
    // TreeBody indicates the current operator sub-tree is not finished, still
    // has child operators to be attached on.
    TreeBody = '│'
    // TreeMiddleNode indicates this operator is not the last child of the
    // current sub-tree rooted by its parent.
    TreeMiddleNode = '├'
    // TreeLastNode indicates this operator is the last child of the current
    // sub-tree rooted by its parent.
    TreeLastNode = '└'
    // TreeGap is used to represent the gap between the branches of the tree.
    TreeGap = ' '
    // TreeNodeIdentifier is used to replace the treeGap once we need to attach
    // a node to a sub-tree.
    TreeNodeIdentifier = '─'
)

func Indent4Child Uses

func Indent4Child(indent string, isLastChild bool) string

Indent4Child appends more blank to the `indent` string

func PrettyIdentifier Uses

func PrettyIdentifier(id, indent string, isLastChild bool) string

PrettyIdentifier returns a pretty identifier which contains indent and tree node hierarchy indicator

Package texttree is imported by 9 packages. Updated 2019-10-30. Refresh now. Tools for package owners.