stackutils

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderTree added in v0.0.35

func RenderTree(node *StackTreeNode, branchDataFn func(branchName string, isTrunk bool) string) string

Types

type StackTreeBranchInfo

type StackTreeBranchInfo struct {
	BranchName       string
	ParentBranchName string
}

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 BuildStackTreeCurrentStack(tx meta.ReadTx, currentBranch string, sortCurrent bool) (*StackTreeNode, error)

func BuildStackTreeRelatedBranchStacks added in v0.0.36

func BuildStackTreeRelatedBranchStacks(tx meta.ReadTx, currentBranch string, sortCurrent bool, relatedBranches []string) ([]*StackTreeNode, error)

func BuildTree added in v0.0.36

func BuildTree(currentBranchName string, branches []*StackTreeBranchInfo, sortCurrent bool) []*StackTreeNode

Jump to

Keyboard shortcuts

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