Documentation
¶
Index ¶
- func GetDescendantBranchNames(rootNode *StackTreeNode, branchName string) []string
- func GetParentBranchNames(rootNode *StackTreeNode, branchName string) []string
- func RenderTree(node *StackTreeNode, branchDataFn func(branchName string, isTrunk bool) string) string
- type StackTreeBranchInfo
- type StackTreeNode
- func BuildStackTreeAllBranches(tx meta.ReadTx, currentBranch string, sortCurrent bool) []*StackTreeNode
- func BuildStackTreeCurrentStack(tx meta.ReadTx, currentBranch string, sortCurrent bool) (*StackTreeNode, error)
- func BuildStackTreeRelatedBranchStacks(tx meta.ReadTx, currentBranch string, sortCurrent bool, ...) ([]*StackTreeNode, error)
- func BuildTree(currentBranchName string, branches []*StackTreeBranchInfo, sortCurrent bool) []*StackTreeNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDescendantBranchNames ¶ added in v0.1.14
func GetDescendantBranchNames(rootNode *StackTreeNode, branchName string) []string
GetDescendantBranchNames returns the descendant branch names of the given branch.
func GetParentBranchNames ¶ added in v0.1.14
func GetParentBranchNames(rootNode *StackTreeNode, branchName string) []string
GetParentBranchNames returns the parent branch names of the given branch. The returned slice is ordered from immediate parent to the root.
func RenderTree ¶ added in v0.0.35
func RenderTree( node *StackTreeNode, branchDataFn func(branchName string, isTrunk bool) string, ) string
Types ¶
type StackTreeBranchInfo ¶
type StackTreeNode ¶
type StackTreeNode struct {
Branch *StackTreeBranchInfo
Children []*StackTreeNode
}
func BuildStackTreeAllBranches ¶ added in v0.0.36
func BuildStackTreeAllBranches( tx meta.ReadTx, currentBranch string, sortCurrent bool, ) []*StackTreeNode
func BuildStackTreeCurrentStack ¶ added in v0.0.36
func BuildStackTreeRelatedBranchStacks ¶ added in v0.0.36
func BuildTree ¶ added in v0.0.36
func BuildTree( currentBranchName string, branches []*StackTreeBranchInfo, sortCurrent bool, ) []*StackTreeNode
Click to show internal directories.
Click to hide internal directories.