MCPcopy Create free account
hub / github.com/Macmod/godap / getParentNode

Function getParentNode

tui/interface.go:20–28  ·  view source on GitHub ↗
(node *tview.TreeNode, tree *tview.TreeView)

Source from the content-addressed store, hash-verified

18}
19
20func getParentNode(node *tview.TreeNode, tree *tview.TreeView) *tview.TreeNode {
21 pathToCurrent := tree.GetPath(node)
22
23 if len(pathToCurrent) > 1 {
24 return pathToCurrent[len(pathToCurrent)-2]
25 }
26
27 return nil
28}
29
30func findEntryInChildren(dn string, parent *tview.TreeNode) int {
31 siblings := parent.GetChildren()

Callers 3

initADIDNSPageFunction · 0.85
reloadParentNodeFunction · 0.85
treePanelKeyHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected