Add doc comment for GetTreeNodeByReference
This commit is contained in:
parent
5f8d6f1399
commit
7eac041b80
1 changed files with 1 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ func NewTextChannelTreeNode(c discord.Channel) (n *tview.TreeNode) {
|
|||
return
|
||||
}
|
||||
|
||||
// GetTreeNodeByReference gets the TreeNode that has reference r from the given treeview.
|
||||
func GetTreeNodeByReference(r interface{}, treeV *tview.TreeView) (mn *tview.TreeNode) {
|
||||
treeV.GetRoot().Walk(func(n, _ *tview.TreeNode) bool {
|
||||
if n.GetReference() == r {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue