Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( VisASCII = VisProf{ // contains filtered or unexported fields } VisRounded = VisProf{ // contains filtered or unexported fields } VisSquare = VisProf{ // contains filtered or unexported fields } )
Pre-configured visual profiles for trees.
var ErrNoVis = errors.New("node has no String() method")
ErrNoVis indicates that a node cannot be visualized.
var ErrNotVisitable = errors.New("object has no Children() method")
ErrNotVisitable indicates that the object cannot be visited.
Functions ¶
Types ¶
type FlagSet ¶
type FlagSet interface { // FlagName retrieves the name for a flag corresponding to the // specified bit. FlagName(b uint) string // Flags retrieves a list of flags corresponding to the // specified bit set. The flags will be in order from lowest // set bit to highest. Flags(flags interface{}) []string }
FlagSet is an interface representing sets of named flags.
type FlagSet16 ¶
FlagSet16 is a mapping from flags to flag names.
type FlagSet32 ¶
FlagSet32 is a mapping from flags to flag names.
type FlagSet64 ¶
FlagSet64 is a mapping from flags to flag names.
type FlagSet8 ¶
FlagSet8 is a mapping from flags to flag names.
type VisOption ¶
type VisOption func(opts *visCtxt)
VisOption is an option for the tree visualizer.
func VisPredicate ¶
VisPredicate sets the predicate for visualizing a tree node.
func VisProfile ¶
VisProfile sets the visual profile to use for the visualization.
type VisPred ¶
VisPred is a predicate function called on a given Visitable to produce a string representation of a single node in a tree.
type VisProf ¶
type VisProf struct {
// contains filtered or unexported fields
}
VisProf represents a visual profile for visualizing a tree.
type VisitPred ¶
VisitPred is a predicate function called on each of the child nodes of a Visitable. It is called with a context, the Visitable being visited, and a boolean indicating if the Visitable is the last child of its parent. It should return a context to be passed to the VisitPred for its children and an error.